diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 18:06:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 18:06:01 +0000 |
commit | 8c78ebb3e8ecbd98dc0ce894e43222776013cd7c (patch) | |
tree | d2b33545b65f2c0b895f82d17f5d004662a18863 /src | |
parent | 27edb86adbea04b4b17166cfa0f5f1cd7ba0e3c3 (diff) |
Fix listmodes and modes with params
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4136 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 7 |
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); |