summaryrefslogtreecommitdiff
path: root/src/modules/m_chanfilter.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-01-27 13:05:14 +0000
committerPeter Powell <petpow@saberuk.com>2018-01-29 11:52:13 +0000
commitd5a6054948502625d7f0c235f6faaeea58734de5 (patch)
treea43e95ded07dca92c9d3659e331a88cb8e0b7b21 /src/modules/m_chanfilter.cpp
parent3398ce7e50f1c269e8221df04e1eefb52d54c820 (diff)
Add ERR_INVALIDMODEPARAM for responding to invalid mode params.
Currently on invalid modes we do a combination of different things: 1. Send a custom mode-specific numeric (which often collides with other modes). 2. Send a server notice. 3. Do absolutely nothing. This new numeric is a generic way of handling invalid parameters when setting a mode that avoids all of the mistakes of the previous behaviour.
Diffstat (limited to 'src/modules/m_chanfilter.cpp')
-rw-r--r--src/modules/m_chanfilter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index e7dc6372b..d201f5418 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -37,7 +37,7 @@ class ChanFilter : public ListModeBase
bool ValidateParam(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE {
if (word.length() > 35)
{
- user->WriteNumeric(935, chan->name, word, "%word is too long for censor list");
+ user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Word is too long for the spamfilter list"));
return false;
}