summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-09-26 20:58:55 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-09-26 20:58:55 +0200
commitaa5a97bfd618d26fe5c082d57557cea20cbe342d (patch)
tree10aa5a88f3136a78e454cfc1838024961c5a7c85 /src/channels.cpp
parent635cf9590b116eed03f38fc44bcdb96665f81f22 (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
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp3
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);
}
}