1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 11:46:38 +02:00

- Remove redundant ano_modclose(), this is done in module destructor anyway

- Remove old AnopeFini stuff, this is now handled by module destructors.


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1608 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-11-09 01:28:45 +00:00
parent c363ad0efe
commit d2cb6b78c1
+6 -21
View File
@@ -712,32 +712,17 @@ int unloadModule(Module * m, User * u)
return MOD_ERR_NOUNLOAD;
}
func = (void (*)(void))ano_modsym(m->handle, "AnopeFini");
if (func) {
mod_current_module_name = m->name.c_str();
func(); /* exec AnopeFini */
mod_current_module_name = NULL;
}
if (prepForUnload(m) != MOD_ERR_OK) {
return MOD_ERR_UNKNOWN;
}
if ((ano_modclose(m->handle)) != 0) {
alog("%s", ano_moderr());
if (u) {
notice_lang(s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name.c_str());
}
return MOD_ERR_NOUNLOAD;
} else {
if (u) {
ircdproto->SendGlobops(s_OperServ, "%s unloaded module %s", u->nick,
m->name.c_str());
notice_lang(s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str());
}
delModule(m);
return MOD_ERR_OK;
if (u) {
ircdproto->SendGlobops(s_OperServ, "%s unloaded module %s", u->nick,
m->name.c_str());
notice_lang(s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str());
}
delModule(m);
return MOD_ERR_OK;
}
/**