]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_servprotect.cpp
m_nationalchars Rebuild core hashmaps when the national_case_insensitive_map changes
[user/henk/code/inspircd.git] / src / modules / m_servprotect.cpp
index 4f20ce000864057da28097fb4c7bf2d34e3a7c42..b4f2b5bbd5ae5ba5a42ac78a9db2587e8a7c4ec9 100644 (file)
@@ -55,10 +55,9 @@ class ModuleServProtectMode : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&bm))
-                       throw ModuleException("Could not add new modes!");
+               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));
        }