diff options
author | Peter Powell <petpow@saberuk.com> | 2018-01-27 12:24:47 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-02-02 10:43:32 +0000 |
commit | c2376ac6f49ab01794a21a3e9bb7c1b3c5a1c2d8 (patch) | |
tree | 48945089a65ba91aa1414821b60f88fae1592c2a /src/modules/m_chanfilter.cpp | |
parent | d5a6054948502625d7f0c235f6faaeea58734de5 (diff) |
Add names for a bunch of numerics.
Diffstat (limited to 'src/modules/m_chanfilter.cpp')
-rw-r--r-- | src/modules/m_chanfilter.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index d201f5418..70535a475 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -27,6 +27,14 @@ #include "listmode.h" #include "modules/exemption.h" +enum +{ + // InspIRCd-specific. + ERR_ALREADYCHANFILTERED = 937, + ERR_NOSUCHCHANFILTER = 938, + ERR_CHANFILTERFULL = 939 +}; + /** Handles channel mode +g */ class ChanFilter : public ListModeBase @@ -46,17 +54,17 @@ class ChanFilter : public ListModeBase void TellListTooLong(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE { - user->WriteNumeric(939, chan->name, word, "Channel spamfilter list is full"); + user->WriteNumeric(ERR_CHANFILTERFULL, chan->name, word, "Channel spamfilter list is full"); } void TellAlreadyOnList(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE { - user->WriteNumeric(937, chan->name, InspIRCd::Format("The word %s is already on the spamfilter list", word.c_str())); + user->WriteNumeric(ERR_ALREADYCHANFILTERED, chan->name, InspIRCd::Format("The word %s is already on the spamfilter list", word.c_str())); } void TellNotSet(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE { - user->WriteNumeric(938, chan->name, "No such spamfilter word is set"); + user->WriteNumeric(ERR_NOSUCHCHANFILTER, chan->name, "No such spamfilter word is set"); } }; |