X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nokicks.cpp;h=1be389bf767ab53c044393ac885b5a866f883876;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=a17e6eb35e92eb81474109bcadd6140341784fce;hpb=84a1569cd60daa64b1ae52a1fff62c0dc4d78850;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index a17e6eb35..1be389bf7 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -42,15 +42,14 @@ 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, sizeof(eventlist)/sizeof(Implementation)); } - void On005Numeric(std::string &output) + void On005Numeric(std::map& tokens) { - ServerInstance->AddExtBanChar('Q'); + tokens["EXTBAN"].push_back('Q'); } ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason) @@ -64,15 +63,10 @@ class ModuleNoKicks : public Module return MOD_RES_PASSTHRU; } - ~ModuleNoKicks() - { - } - Version GetVersion() { return Version("Provides channel mode +Q to prevent kicks on the channel.", VF_VENDOR); } }; - MODULE_INIT(ModuleNoKicks)