summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-21 22:09:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-21 22:09:06 +0000
commit208c3ab61128911b80d25549b896f3cd5eea6497 (patch)
tree8495e765b548f09772fffc49ea648f09e6ed761c /src
parent68c8383ce3df85cd119c29c5a9dfcdf7f16341f8 (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')
-rw-r--r--src/modules/m_chanfilter.cpp4
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;
}