From aa5a97bfd618d26fe5c082d57557cea20cbe342d Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 26 Sep 2014 20:58:55 +0200 Subject: 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 --- src/channels.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); } } -- cgit v1.2.3