]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nopartmsg.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_nopartmsg.cpp
index f061d278b4800be373a48a32861e8b6f30cb267b..be01fa6c01cac38d84142558c5079c883b7f6d86 100644 (file)
 
 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<std::string, std::string>& tokens)
        {
-               ServerInstance->AddExtBanChar('p');
+               tokens["EXTBAN"].push_back('p');
        }
 };
 
-
 MODULE_INIT(ModulePartMsgBan)
-