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