]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanfilter.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / modules / m_chanfilter.cpp
index ab7339d7e5335af556a92009b7badcf43939d1c8..ecb4e6db342301a519cb9c6a3842e833ba8ba099 100644 (file)
@@ -93,7 +93,7 @@ class ModuleChanFilter : public Module
                        {
                                if (line.find(*i) != std::string::npos)
                                {
-                                       WriteServ(user->fd,"936 %s %s :Your message contained a censored word, and was blocked",user->nick, chan->name);
+                                       WriteServ(user->fd,"936 %s %s %s :Your message contained a censored word, and was blocked",user->nick, chan->name, i->c_str());
                                        return 1;
                                }
                        }
@@ -101,7 +101,7 @@ class ModuleChanFilter : public Module
                return 0;
        }
 
-       virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text)
+       virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status)
        {
                if (target_type == TYPE_CHANNEL)
                {
@@ -110,13 +110,9 @@ class ModuleChanFilter : public Module
                else return 0;
        }
 
-       virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text)
+       virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status)
        {
-               if (target_type == TYPE_CHANNEL)
-               {
-                       return ProcessMessages(user,(chanrec*)dest,text);
-               }
-               else return 0;
+               return OnUserPreMessage(user,dest,target_type,text,status);
        }
        
        virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)