diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-09 01:28:45 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-09 01:28:45 +0000 |
commit | d2cb6b78c11888dbcf10187ff9c2cc192ef2d9a5 (patch) | |
tree | 3bc44b241ae0f610e881661c332de983655ea933 /src/modules.c | |
parent | c363ad0efe7928ef42f35007f3b955b1c23db859 (diff) |
- 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
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 27 |
1 files 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; } /** |