*/
-#define _CRT_SECURE_NO_DEPRECATE
-#define _SCL_SECURE_NO_DEPRECATE
-
#include "inspircd.h"
#include "listmode.h"
bool ValidateParam(User* user, Channel* chan, std::string &word)
{
- if ((word.length() > 35) || (word.empty()))
+ if (word.length() > 35)
{
- user->WriteNumeric(935, "%s %s :word is too %s for censor list", chan->name.c_str(), word.c_str(), (word.empty() ? "short" : "long"));
+ user->WriteNumeric(935, chan->name, word, "%word is too long for censor list");
return false;
}
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");
}
};
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;
}
}