X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chanfilter.cpp;h=a7bc215570c221e54e6419ff2a623d55b8d99c33;hb=da29af8cba49d51e53d6e68237ccbf6370b6dd1f;hp=53428a5a871af08f19274155a4a7ebb31ba810bb;hpb=28dcc1f9e017152f03b0d9bfbcc494260b015a0a;p=user%2Fhenk%2Fcode%2Finspircd.git 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; } }