diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-04 13:09:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-04 13:09:18 +0000 |
commit | 235a0a2035bda6dd214719107083266207f39883 (patch) | |
tree | ffb6b257f722b9b1e3532d3edaf933e0fdf8f372 /src/modules/m_noctcp.cpp | |
parent | 416cc382022d9c41670e7b53390a900ef0ec8c89 (diff) |
Added "char status" parameter to OnUserPreNotice and OnUserPreMessage for NOTICE @#chan etc.
Tidied up craq++ in modules (copy and pasting OnUserPreNotice into OnUserPreMessage?! why not just call one from the other!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3072 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_noctcp.cpp')
-rw-r--r-- | src/modules/m_noctcp.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index ad6c74e84..ab0808aa2 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -47,27 +47,12 @@ class ModuleNoCTCP : public Module InsertMode(output,"C",4); } - 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) - { - chanrec* c = (chanrec*)dest; - if (c->IsCustomModeSet('C')) - { - if ((text.length()) && (text[0] == '\1')) - { - if (strncmp(text.c_str(),"\1ACTION ",8)) - { - WriteServ(user->fd,"492 %s %s :Can't send CTCP to channel (+C set)",user->nick, c->name); - return 1; - } - } - } - } - return 0; + return OnUserPreNotice(user,dest,target_type,text,status); } - 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) { |