From de902c6db3923facb7393fc63a315a04fe580434 Mon Sep 17 00:00:00 2001 From: Adam- Date: Wed, 5 May 2010 20:09:28 +0000 Subject: Always set mod_current_module and mod_current_module_name, fixes a few of the functions in modules.c relying on it. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2931 5417fbe8-f217-4b02-8779-1006273d7864 --- src/commands.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/commands.c') diff --git a/src/commands.c b/src/commands.c index f846ee8db..cbc99b800 100644 --- a/src/commands.c +++ b/src/commands.c @@ -96,18 +96,18 @@ void do_run_cmd(char *service, User * u, Command * c, const char *cmd) } } else { mod_current_module_name = c->mod_name; - mod_current_module = NULL; + mod_current_module = findModule(c->mod_name); if ((c->has_priv == NULL) || c->has_priv(u)) { retVal = c->routine(u); - mod_current_module_name = NULL; if (retVal == MOD_CONT) { current = c->next; while (current && retVal == MOD_CONT) { mod_current_module_name = current->mod_name; - mod_current_module = NULL; + mod_current_module = findModule(current->mod_name); if (current->routine) retVal = current->routine(u); mod_current_module_name = NULL; + mod_current_module = NULL; current = current->next; } } @@ -117,6 +117,7 @@ void do_run_cmd(char *service, User * u, Command * c, const char *cmd) u->nick, service, cmd); } mod_current_module_name = NULL; + mod_current_module = NULL; } } else { if ((!checkDefCon(DEFCON_SILENT_OPER_ONLY)) || is_oper(u)) { -- cgit