X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nopartmsg.cpp;h=be01fa6c01cac38d84142558c5079c883b7f6d86;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=f061d278b4800be373a48a32861e8b6f30cb267b;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index f061d278b..be01fa6c0 100644 --- a/src/modules/m_nopartmsg.cpp +++ b/src/modules/m_nopartmsg.cpp @@ -23,16 +23,11 @@ class ModulePartMsgBan : public Module { - private: public: void init() { Implementation eventlist[] = { I_OnUserPart, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 2); - } - - virtual ~ModulePartMsgBan() - { + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual Version GetVersion() @@ -40,7 +35,6 @@ class ModulePartMsgBan : public Module return Version("Implements extban +b p: - part message bans", VF_OPTCOMMON|VF_VENDOR); } - virtual void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts) { if (!IS_LOCAL(memb->user)) @@ -48,16 +42,12 @@ class ModulePartMsgBan : public Module if (memb->chan->GetExtBanStatus(memb->user, 'p') == MOD_RES_DENY) partmessage.clear(); - - return; } - virtual void On005Numeric(std::string &output) + virtual void On005Numeric(std::map& tokens) { - ServerInstance->AddExtBanChar('p'); + tokens["EXTBAN"].push_back('p'); } }; - MODULE_INIT(ModulePartMsgBan) -