]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hidechans.cpp
Reasonably sized fix - when adding modes in modules, be sure to check the return...
[user/henk/code/inspircd.git] / src / modules / m_hidechans.cpp
index 2545db187f87879b6a9c8428501f99ac53ae0d78..9e39e2a73ad53cef708c6cc3a38e87b797131a09 100644 (file)
@@ -62,7 +62,8 @@ class ModuleHideChans : public Module
        {
                
                hm = new HideChans(ServerInstance);
-               ServerInstance->AddMode(hm, 'I');
+               if (!ServerInstance->AddMode(hm, 'I'))
+                       throw ModuleException("Could not add new modes!");
        }
 
        void Implements(char* List)