summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules.c b/src/modules.c
index 91d4105b4..bbe44b18b 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -245,6 +245,7 @@ void modules_unload_all(boolean fini)
mh = MODULE_HASH[idx];
while (mh) {
next = mh->next;
+ mod_current_module = mh->m;
if(fini) {
func = (void (*)(void))ano_modsym(mh->m->handle, "AnopeFini");
if (func) {
@@ -738,10 +739,6 @@ int prepForUnload(Module * m)
return MOD_ERR_PARAMS;
}
- if (m->type == PROTOCOL) {
- return MOD_ERR_NOUNLOAD; /* you cant unload protocol modules */
- }
-
/* Kill any active callbacks this module has */
moduleCallBackPrepForUnload(m->name);