]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_joinflood.cpp
Remove some uline checks that ran after an IS_LOCAL() check
[user/henk/code/inspircd.git] / src / modules / m_joinflood.cpp
index 544995fe1435d8e6ac86cab0c2d5f4c862cc7ce7..0c68da1fb42445433e7777b1ef75cfe0d1190aab 100644 (file)
@@ -202,11 +202,10 @@ class ModuleJoinFlood : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&jf))
-                       throw ModuleException("Could not add new modes!");
-               ServerInstance->Extensions.Register(&jf.ext);
+               ServerInstance->Modules->AddService(jf);
+               ServerInstance->Modules->AddService(jf.ext);
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserJoin };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)