]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Switch <stdint.h> test to use a test file too.
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index e8bceffd432449e649da9c0858136f8f93b14810..1f58a2e08b71a7663ef052acd14b89e92a2610b4 100644 (file)
@@ -42,10 +42,9 @@ class ModuleNoKicks : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&nk))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(nk);
                Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void On005Numeric(std::string &output)