X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_servprotect.cpp;h=b4f2b5bbd5ae5ba5a42ac78a9db2587e8a7c4ec9;hb=1377fabfee72994531df274248ed0ce6de483dd2;hp=4f20ce000864057da28097fb4c7bf2d34e3a7c42;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 4f20ce000..b4f2b5bbd 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -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)); }