diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-02-25 16:12:09 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-02-25 16:12:09 +0100 |
commit | da29af8cba49d51e53d6e68237ccbf6370b6dd1f (patch) | |
tree | 5546764f28ff9457efa3a0f90ae6778953590293 /src/modules/m_chanfilter.cpp | |
parent | 28dcc1f9e017152f03b0d9bfbcc494260b015a0a (diff) |
Convert WriteNumeric() calls to pass the parameters of the numeric as method parameters
Diffstat (limited to 'src/modules/m_chanfilter.cpp')
-rw-r--r-- | src/modules/m_chanfilter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 53428a5a8..a7bc21557 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -37,7 +37,7 @@ class ChanFilter : public ListModeBase { if (word.length() > 35) { - user->WriteNumeric(935, "%s %s :word is too long for censor list", chan->name.c_str(), word.c_str()); + user->WriteNumeric(935, chan->name, word, "%word is too long for censor list"); return false; } @@ -46,17 +46,17 @@ class ChanFilter : public ListModeBase void TellListTooLong(User* user, Channel* chan, std::string &word) { - user->WriteNumeric(939, "%s %s :Channel spamfilter list is full", chan->name.c_str(), word.c_str()); + user->WriteNumeric(939, chan->name, word, "Channel spamfilter list is full"); } void TellAlreadyOnList(User* user, Channel* chan, std::string &word) { - user->WriteNumeric(937, "%s :The word %s is already on the spamfilter list", chan->name.c_str(), word.c_str()); + user->WriteNumeric(937, 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) { - user->WriteNumeric(938, "%s :No such spamfilter word is set", chan->name.c_str()); + user->WriteNumeric(938, chan->name, "No such spamfilter word is set"); } }; @@ -98,9 +98,9 @@ class ModuleChanFilter : public Module if (InspIRCd::Match(text, i->mask)) { if (hidemask) - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :Cannot send to channel (your message contained a censored word)", chan->name.c_str()); + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (your message contained a censored word)"); else - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s %s :Cannot send to channel (your message contained a censored word)", chan->name.c_str(), i->mask.c_str()); + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, i->mask, "Cannot send to channel (your message contained a censored word)"); return MOD_RES_DENY; } } |