From d2cb6b78c11888dbcf10187ff9c2cc192ef2d9a5 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Sun, 9 Nov 2008 01:28:45 +0000 Subject: [PATCH] - 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 --- src/modules.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/modules.c b/src/modules.c index 8a37d3eb8..b7c0d142c 100644 --- a/src/modules.c +++ b/src/modules.c @@ -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; } /**