diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-09-26 20:58:55 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-09-26 20:58:55 +0200 |
commit | aa5a97bfd618d26fe5c082d57557cea20cbe342d (patch) | |
tree | 10aa5a88f3136a78e454cfc1838024961c5a7c85 | |
parent | 635cf9590b116eed03f38fc44bcdb96665f81f22 (diff) |
Don't try to set a mode in Channel::SetDefaultModes() if it needs a parameter but does not have one
Thanks to @docwhat for helping to track this down, fixes issue #924
-rw-r--r-- | src/channels.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 6c9bd7c85..9eee987f1 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -206,6 +206,9 @@ void Channel::SetDefaultModes() else parameter.clear(); + if ((mode->GetNumParams(true)) && (parameter.empty())) + continue; + mode->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, this, parameter, true); } } |