summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-19 14:14:00 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-19 14:14:00 +0000
commit64362e2fcd50ea2492d6ceb94bccec9764f3e4ef (patch)
tree2f91898b9fb8b77ccec85a65f9df92b651c4f443 /src/modules.cpp
parentf3e45bfb0e74d431fcb4a2fcd0c024f73f73e7c2 (diff)
Clean up some log messages
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11917 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 8957b4bb6..c5bd87cde 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -476,6 +476,16 @@ void ModuleManager::DoSafeUnload(Module* mod)
mod->OnCleanup(TYPE_USER,u->second);
u->second->doUnhookExtensions(items);
}
+ for(char m='A'; m < 'z'; m++)
+ {
+ ModeHandler* mh;
+ mh = ServerInstance->Modes->FindMode(m, MODETYPE_USER);
+ if (mh && mh->creator == mod)
+ ServerInstance->Modes->DelMode(mh);
+ mh = ServerInstance->Modes->FindMode(m, MODETYPE_CHANNEL);
+ if (mh && mh->creator == mod)
+ ServerInstance->Modes->DelMode(mh);
+ }
/* Tidy up any dangling resolvers */
ServerInstance->Res->CleanResolvers(mod);
@@ -607,8 +617,7 @@ void ModuleManager::UnloadAll()
std::map<std::string, Module*>::iterator me = i++;
if (CanUnload(me->second))
{
- ServerInstance->GlobalCulls.AddItem(me->second);
- Modules.erase(me);
+ DoSafeUnload(me->second);
}
}
ServerInstance->GlobalCulls.Apply();