]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
m_dccallow Add config option to control max entries on a list
[user/henk/code/inspircd.git] / src / channels.cpp
index 6c9bd7c85130f8927758c06895118f26861d09bc..9f1eafd0cb1f1e9654a8d3890310a46ac98af26a 100644 (file)
@@ -202,10 +202,18 @@ void Channel::SetDefaultModes()
                if (mode)
                {
                        if (mode->GetNumParams(true))
+                       {
                                list.GetToken(parameter);
+                               // If the parameter begins with a ':' then it's invalid
+                               if (parameter.c_str()[0] == ':')
+                                       continue;
+                       }
                        else
                                parameter.clear();
 
+                       if ((mode->GetNumParams(true)) && (parameter.empty()))
+                               continue;
+
                        mode->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, this, parameter, true);
                }
        }