diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-06 00:56:29 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-06 00:56:29 +0000 |
| commit | 8e59e5898763913a3db504538dd21595c0618bbb (patch) | |
| tree | 869042e0e9aa858521c447281eac26faafd84ac9 /src | |
| parent | de902c6db3923facb7393fc63a315a04fe580434 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
