diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules.c b/src/modules.c index 8296301fe..f366ff23e 100644 --- a/src/modules.c +++ b/src/modules.c @@ -238,11 +238,6 @@ void modules_unload_all(boolean fini) while (mh) { next = mh->next; if(fini) { - if (prepForUnload(mh->m) != MOD_ERR_OK) { - mh = next; - continue; - } - func = (void (*)(void))ano_modsym(mh->m->handle, "AnopeFini"); if (func) { mod_current_module_name = mh->m->name; @@ -250,6 +245,11 @@ void modules_unload_all(boolean fini) mod_current_module_name = NULL; } + if (prepForUnload(mh->m) != MOD_ERR_OK) { + mh = next; + continue; + } + if ((ano_modclose(mh->m->handle)) != 0) alog(ano_moderr()); else |