diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-21 22:09:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-21 22:09:06 +0000 |
commit | 208c3ab61128911b80d25549b896f3cd5eea6497 (patch) | |
tree | 8495e765b548f09772fffc49ea648f09e6ed761c /src/modules | |
parent | 68c8383ce3df85cd119c29c5a9dfcdf7f16341f8 (diff) |
Dont allow people to add censor words containing spaces silently to the censor list (which count as a null string and match everything)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5511 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_chanfilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 139f80082..1cdee87a8 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -37,9 +37,9 @@ class ChanFilter : public ListModeBase virtual bool ValidateParam(userrec* user, chanrec* chan, std::string &word) { - if (word.length() > 35) + if ((word.length() > 35) || (word.empty())) { - user->WriteServ( "935 %s %s %s :word is too long for censor list",user->nick, chan->name,word.c_str()); + user->WriteServ("935 %s %s %s :word is too %s for censor list",user->nick, chan->name,word.c_str(), (word.empty() ? "short" : "long")); return false; } |