X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nokicks.cpp;h=1f58a2e08b71a7663ef052acd14b89e92a2610b4;hb=4c751dbbe8945e5efc230a59b0ed51c2ba10cf92;hp=e8bceffd432449e649da9c0858136f8f93b14810;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index e8bceffd4..1f58a2e08 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -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)