From 8e59e5898763913a3db504538dd21595c0618bbb Mon Sep 17 00:00:00 2001 From: Adam- Date: Thu, 6 May 2010 00:56:29 +0000 Subject: Fixed unloading modules commands, fixes a crash introduced by the last commit git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2935 5417fbe8-f217-4b02-8779-1006273d7864 --- src/modules.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules.c b/src/modules.c index 728575005..36a11052c 100644 --- a/src/modules.c +++ b/src/modules.c @@ -754,8 +754,6 @@ int unloadModule(Module * m, User * u) mod_current_module = m; mod_current_module_name = m->name; func(); /* exec AnopeFini */ - mod_current_module = NULL; - mod_current_module_name = NULL; } if (prepForUnload(m) != MOD_ERR_OK) { @@ -767,6 +765,8 @@ int unloadModule(Module * m, User * u) if (u) { notice_lang(s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name); } + mod_current_module = NULL; + mod_current_module_name = NULL; return MOD_ERR_NOUNLOAD; } else { if (u) { @@ -775,6 +775,8 @@ int unloadModule(Module * m, User * u) notice_lang(s_OperServ, u, OPER_MODULE_UNLOADED, m->name); } delModule(m); + mod_current_module = NULL; + mod_current_module_name = NULL; return MOD_ERR_OK; } #else -- cgit