diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-17 01:17:00 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-17 01:17:00 +0000 |
commit | 63f55fa78b5fb3fb58d354df3f2311d9c92ac098 (patch) | |
tree | dc925cbdf32268edcb157b54bbb6b74c2ee84dbd | |
parent | 11709eade60570b8a1bcb944658a96096ee7e062 (diff) |
Made MOD_STOP returned from commands really halt processing (stops OnPostCommand event being called)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2565 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/commands.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commands.c b/src/commands.c index a3ba87e1c..960f5ac06 100644 --- a/src/commands.c +++ b/src/commands.c @@ -52,7 +52,7 @@ Command *lookup_cmd(Command * list, char *cmd) void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char *cmd) { Command *c = findCommand(cmdTable, cmd); - int retVal = 0; + int retVal = MOD_CONT; ChannelInfo *ci; if (!c) @@ -174,7 +174,10 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char * retVal = c->Execute(u, params); - FOREACH_MOD(I_OnPostCommand, OnPostCommand(u, c->service, c->name.c_str(), params)); + if (retVal == MOD_CONT) + { + FOREACH_MOD(I_OnPostCommand, OnPostCommand(u, c->service, c->name.c_str(), params)); + } } /*************************************************************************/ |