]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_joinflood.cpp
Remove some debug (im on a crusade to make debug mode useful, but at the same time...
[user/henk/code/inspircd.git] / src / modules / m_joinflood.cpp
index 983090d09af96d2718b7898e0b18c6c2953d443f..1410c7d98982e728f3ff53f6632d183ccac4de8f 100644 (file)
@@ -135,6 +135,7 @@ class JoinFlood : public ModeHandler
                                else data++;
                        }
                        if (secs)
+
                        {
                                /* Set up the flood parameters for this channel */
                                int njoins = atoi(joins);
@@ -222,7 +223,8 @@ class ModuleJoinFlood : public Module
        {
                
                jf = new JoinFlood(ServerInstance);
-               ServerInstance->AddMode(jf, 'j');
+               if (!ServerInstance->AddMode(jf, 'j'))
+                       throw ModuleException("Could not add new modes!");
        }
        
        virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)