aboutsummaryrefslogtreecommitdiffstats
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2018-09-11 09:03:47 +0100
committerGravatar Peter Powell2018-09-11 09:03:47 +0100
commit7e9ec8e49060024033efe55342c933b86288e31c (patch)
treeaa39a4fb8319382ac492e168525a18bebae2f732 /src/command_parse.cpp
parentAdd a module for hiding mode changes from unprivileged users. (diff)
downloadinspircd++-7e9ec8e49060024033efe55342c933b86288e31c.tar.gz
inspircd++-7e9ec8e49060024033efe55342c933b86288e31c.tar.bz2
inspircd++-7e9ec8e49060024033efe55342c933b86288e31c.zip
Amend OnPostCommand to specify whether the command is loopcalled.
This restores previous behaviour which was lost when the original line parameter was removed.
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 503630d53..d4dd7da21 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -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));
}
}