]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_servprotect.cpp
Switch <stdint.h> test to use a test file too.
[user/henk/code/inspircd.git] / src / modules / m_servprotect.cpp
index 797c541ebeace657dea0205c3e6ae12ad119f0b2..b4f2b5bbd5ae5ba5a42ac78a9db2587e8a7c4ec9 100644 (file)
@@ -51,10 +51,13 @@ class ModuleServProtectMode : public Module
        ModuleServProtectMode()
                : bm(this)
        {
-               if (!ServerInstance->Modes->AddMode(&bm))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(bm);
                Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine, I_OnRawMode, I_OnUserPreKick };
-               ServerInstance->Modules->Attach(eventlist, this, 5);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }