diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 695f043da..1ae8dce07 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -455,6 +455,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool continue; } + bool had_parameter = !parameter.empty(); for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) { if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type) == MODEACTION_DENY) @@ -462,6 +463,12 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool abort = true; break; } + /* A module whacked the parameter completely, and there was one. abort. */ + if ((had_parameter) && (parameter.empty())) + { + abort = true; + break; + } } if (abort) |