summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 0fe00f87d..64552c124 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -481,15 +481,16 @@ void ModeParser::Process(char **parameters, int pcnt, userrec *user, bool server
if (modehandlers[handler_id]->GetNumParams(adding))
{
- log(DEBUG,"ModeHandler* for this mode says it has parameters");
+ log(DEBUG,"ModeHandler* for this mode says it has parameters. pcnt=%d parameter_counter=%d",pcnt,parameter_counter);
- if (pcnt < parameter_counter)
+ if (parameter_counter < pcnt)
{
parameter = parameters[parameter_counter++];
}
else
{
- parameter = "";
+ /* No parameter, continue to the next mode */
+ continue;
}
}
ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding);