]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Reject setting modes which are null or not registered.
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 503630d537eaa5f0b409fcd73c76922237a94587..c2ae39d494e3a75579d4635f36f62394d5c95671 100644 (file)
@@ -97,10 +97,10 @@ bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Pa
                        CmdResult result = handler->Handle(user, params);
                        if (localuser)
                        {
-                               // Run the OnPostCommand hook with the last parameter (original line) being empty
-                               // to indicate that the command had more targets in its original form.
+                               // Run the OnPostCommand hook with the last parameter being true to indicate
+                               // that the event is being called in a loop.
                                item.clear();
-                               FOREACH_MOD(OnPostCommand, (handler, new_parameters, localuser, result));
+                               FOREACH_MOD(OnPostCommand, (handler, new_parameters, localuser, result, true));
                        }
                }
        }
@@ -316,7 +316,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
                 */
                CmdResult result = handler->Handle(user, command_p);
 
-               FOREACH_MOD(OnPostCommand, (handler, command_p, user, result));
+               FOREACH_MOD(OnPostCommand, (handler, command_p, user, result, false));
        }
 }
 
@@ -452,7 +452,7 @@ void CommandParser::TranslateSingleParam(TranslateType to, const std::string& it
                        }
                        // If no custom translator was given, fall through
                }
-               case TR_TEXT:
+               /*@fallthrough@*/
                default:
                        /* Do nothing */
                        dest.append(item);