diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-18 03:39:18 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-18 03:39:18 +0000 |
commit | 3c27d028707d8af151e161d90a469f50c0ece758 (patch) | |
tree | 21e39ac6ea1e2242b5cd31e470603a9db3f0e49e /src/modules | |
parent | 37d40095cfd378ad7189b98c1ef4b7cac0377839 (diff) |
m_censor can now block lines as well, by specifying an empty replace string (QA, test please, my dev server seems to be broken :P)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7041 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_censor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 3b7545b58..c378080a5 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -150,6 +150,12 @@ class ModuleCensor : public Module { if (text2.find(index->first) != irc::string::npos) { + if (index->second.empty()) + { + user->WriteServ("936 %s %s %s :Your message contained a censored word, and was blocked", user->nick, ((chanrec*)dest)->name, index->first.c_str()); + return 1; + } + this->ReplaceLine(text2,index->first,index->second); } } |