]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
ISupportManager: Tidy-up, expand comments
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index 3a2f0814fc1b66f5c725bec7f088930ec0d3e2b4..2063628451fb227def141a51e988cc09bf860caa 100644 (file)
@@ -39,22 +39,22 @@ class ModuleNoNotice : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(nt);
-               Implementation eventlist[] = { I_OnUserPreNotice, I_On005Numeric };
+               Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       virtual void On005Numeric(std::map<std::string, std::string>& tokens)
+       void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
        {
                tokens["EXTBAN"].push_back('T');
        }
 
-       virtual ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+       ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
        {
                ModResult res;
-               if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
+               if ((msgtype == MSG_NOTICE) && (target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        Channel* c = (Channel*)dest;
                        if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet('T')))
@@ -72,7 +72,7 @@ class ModuleNoNotice : public Module
                return MOD_RES_PASSTHRU;
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides channel mode +T to block notices to the channel", VF_VENDOR);
        }