From 208c3ab61128911b80d25549b896f3cd5eea6497 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 21 Oct 2006 22:09:06 +0000 Subject: 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 --- src/modules/m_chanfilter.cpp | 4 ++-- 1 file 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; } -- cgit v1.2.3