From 63f55fa78b5fb3fb58d354df3f2311d9c92ac098 Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 17 Oct 2009 01:17:00 +0000 Subject: [PATCH] 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 --- src/commands.c | 7 +++++-- 1 file 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)); + } } /*************************************************************************/