X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_chanprotect.cpp;h=872ff8d7c22b4c99c4e606e93dde60e7bab0ab72;hb=f91a61fa22b239384c31526fd11da1e3030aaa96;hp=77fe3f353b66df0eb4bb257083b9012a0319e6a8;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 77fe3f353..872ff8d7c 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -162,7 +162,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase { public: ChanProtect(Module* Creator) - : ModeHandler(Creator, "protected", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL), + : ModeHandler(Creator, "admin", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL), FounderProtectBase('a',"protected user", 388, 389) { ModeHandler::list = true; @@ -230,15 +230,17 @@ class ModuleChanProtect : public Module ChanFounder cf; public: ModuleChanProtect() : cp(this), cf(this) + { + } + + void init() { /* Load config stuff */ LoadSettings(); settings.booting = false; - if (!ServerInstance->Modes->AddMode(&cp) || !ServerInstance->Modes->AddMode(&cf)) - { - throw ModuleException("Could not add new modes!"); - } + ServerInstance->Modules->AddService(cf); + ServerInstance->Modules->AddService(cp); Implementation eventlist[] = { I_OnUserPreJoin }; ServerInstance->Modules->Attach(eventlist, this, 1); @@ -287,7 +289,7 @@ class ModuleChanProtect : public Module Version GetVersion() { - return Version("Founder and Protect modes (+qa)", VF_COMMON | VF_VENDOR); + return Version("Founder and Protect modes (+qa)", VF_VENDOR); } };