X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_inviteexception.cpp;h=03a2fbc7c59d4ae91cd9f722f6a28bf2d4fe1ebf;hb=5a2af6ded883d71c6c4c9f1497cca1721f8b0742;hp=aeecb9a843214d34b73f6e0cb969c45b8861fd09;hpb=d9d99cd02dadf34bfcc220734ba0c422f0acb3e6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index aeecb9a84..03a2fbc7c 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -24,8 +24,6 @@ #include "inspircd.h" #include "listmode.h" -/* $ModDesc: Provides support for the +I channel mode */ - /* * Written by Om , April 2005. * Based on m_exception, which was originally based on m_chanprotect and m_silence @@ -41,7 +39,11 @@ class InviteException : public ListModeBase { public: - InviteException(Module* Creator) : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", 346, 347, true) { } + InviteException(Module* Creator) + : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", 346, 347, true) + { + syntax = ""; + } }; class ModuleInviteException : public Module @@ -53,19 +55,9 @@ public: { } - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->AddService(ie); - - OnRehash(NULL); - ie.DoImplements(this); - Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - void On005Numeric(std::map& tokens) CXX11_OVERRIDE { - tokens["INVEX"] = "I"; + tokens["INVEX"] = ConvToStr(ie.GetModeChar()); } ModResult OnCheckInvite(User* user, Channel* chan) CXX11_OVERRIDE @@ -92,20 +84,15 @@ public: return MOD_RES_PASSTHRU; } - void OnSyncChannel(Channel* chan, Module* proto, void* opaque) CXX11_OVERRIDE - { - ie.DoSyncChannel(chan, proto, opaque); - } - - void OnRehash(User* user) CXX11_OVERRIDE + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { - invite_bypass_key = ServerInstance->Config->ConfValue("inviteexception")->getBool("bypasskey", true); ie.DoRehash(); + invite_bypass_key = ServerInstance->Config->ConfValue("inviteexception")->getBool("bypasskey", true); } Version GetVersion() CXX11_OVERRIDE { - return Version("Provides support for the +I channel mode", VF_VENDOR); + return Version("Provides channel mode +I, invite exceptions", VF_VENDOR); } };