]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noctcp.cpp
Reasonably sized fix - when adding modes in modules, be sure to check the return...
[user/henk/code/inspircd.git] / src / modules / m_noctcp.cpp
index 0e9120407d137303e0881aa8443c86427e1c1bd6..622a08ac68463bc69de13ed8a6c1eaf6dcd5b21e 100644 (file)
@@ -60,7 +60,8 @@ class ModuleNoCTCP : public Module
        {
                
                nc = new NoCTCP(ServerInstance);
-               ServerInstance->AddMode(nc, 'C');
+               if (!ServerInstance->AddMode(nc, 'C'))
+                       throw ModuleException("Could not add new modes!");
        }
 
        void Implements(char* List)