]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
m_dccallow Add config option to control max entries on a list
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index 0d380facdd532f775e3fb73826ca953c0c197f60..1f58a2e08b71a7663ef052acd14b89e92a2610b4 100644 (file)
@@ -38,10 +38,13 @@ class ModuleNoKicks : public Module
        ModuleNoKicks()
                : nk(this)
        {
-               if (!ServerInstance->Modes->AddMode(&nk))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               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)