]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Remove dependent commands BEFORE deleting the Module*, otherwise things go tits over...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index f667acf8e7161a1546adbc9f112b64e99d4eece7..3ce2261c54034dde2c5282bdcc9ab42dab575ac3 100644 (file)
@@ -536,12 +536,12 @@ bool InspIRCd::UnloadModule(const char* filename)
                        }
 
                        // found the module
+                       log(DEBUG,"Removing dependent commands...");
+                       Parser->RemoveCommands(filename);
                        log(DEBUG,"Deleting module...");
                        this->EraseModule(j);
                        log(DEBUG,"Erasing module entry...");
                        this->EraseFactory(j);
-                       log(DEBUG,"Removing dependent commands...");
-                       Parser->RemoveCommands(filename);
                        log(DEFAULT,"Module %s unloaded",filename);
                        MODCOUNT--;
                        BuildISupport();