]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Destroy Memberships of a quitting user in QuitUser() instead of in cull()
[user/henk/code/inspircd.git] / src / base.cpp
index a4c3e887e39bb13edde8d7a7a2b655e05f3bd94f..cf28f8e7d34375359f1306d37ebde1c79af7415f 100644 (file)
@@ -186,20 +186,24 @@ Extensible::Extensible()
 }
 
 CullResult Extensible::cull()
+{
+       FreeAllExtItems();
+       return classbase::cull();
+}
+
+void Extensible::FreeAllExtItems()
 {
        for(ExtensibleStore::iterator i = extensions.begin(); i != extensions.end(); ++i)
        {
                i->first->free(i->second);
        }
        extensions.clear();
-       return classbase::cull();
 }
 
 Extensible::~Extensible()
 {
        if (!extensions.empty() && ServerInstance && ServerInstance->Logs)
-               ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG,
-                       "Extensible destructor called without cull @%p", (void*)this);
+               ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Extensible destructor called without cull @%p", (void*)this);
 }
 
 LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod)
@@ -312,4 +316,3 @@ ModuleException::ModuleException(const std::string &message, Module* who)
        : CoreException(message, who ? who->ModuleSourceFile : "A Module")
 {
 }
-