]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_deaf.cpp
Change the API of m_sslinfo to be dynamic_reference-based
[user/henk/code/inspircd.git] / src / modules / m_deaf.cpp
index 31d0e603937211781bafaaa1a7aa48357888549c..65591f07081309938890a594381ae41d005fa567 100644 (file)
@@ -70,7 +70,7 @@ class ModuleDeaf : public Module
                ServerInstance->Modules->AddService(m1);
 
                OnRehash(NULL);
-               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
+               Implementation eventlist[] = { I_OnUserPreMessage, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
@@ -81,25 +81,13 @@ class ModuleDeaf : public Module
                deaf_bypasschars_uline = tag->getString("bypasscharsuline");
        }
 
-       ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE
+       ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
        {
                if (target_type == TYPE_CHANNEL)
                {
                        Channel* chan = (Channel*)dest;
                        if (chan)
-                               this->BuildDeafList(MSG_NOTICE, chan, user, status, text, exempt_list);
-               }
-
-               return MOD_RES_PASSTHRU;
-       }
-
-       ModResult OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE
-       {
-               if (target_type == TYPE_CHANNEL)
-               {
-                       Channel* chan = (Channel*)dest;
-                       if (chan)
-                               this->BuildDeafList(MSG_PRIVMSG, chan, user, status, text, exempt_list);
+                               this->BuildDeafList(msgtype, chan, user, status, text, exempt_list);
                }
 
                return MOD_RES_PASSTHRU;