]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcaps.cpp
Argh, i give up
[user/henk/code/inspircd.git] / src / modules / m_blockcaps.cpp
index c041feb31af565b0871467573b654f919ceeeb47..44ad7e8916bca76d8c87b365ec56b0fad17b7871 100644 (file)
@@ -59,7 +59,10 @@ public:
                OnRehash(NULL,"");
                bc = new BlockCaps(ServerInstance);
                if (!ServerInstance->AddMode(bc))
+               {
+                       delete bc;
                        throw ModuleException("Could not add new modes!");
+               }
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }