RPL_SYNTAX = 650, // insp-specific
ERR_INVALIDMODEPARAM = 696, // insp-specific
+ ERR_LISTMODEALREADYSET = 697, // insp-specific
+ ERR_LISTMODENOTSET = 698, // insp-specific
RPL_OTHERUMODEIS = 803, // insp-specific
RPL_OTHERSNOMASKIS = 804, // insp-specific
void ListModeBase::OnParameterMissing(User*, User*, Channel*)
{
+ // Intentionally left blank.
}
void ListModeBase::TellListTooLong(User* source, Channel* channel, std::string& parameter)
source->WriteNumeric(ERR_BANLISTFULL, channel->name, parameter, mode, InspIRCd::Format("Channel %s list is full", name.c_str()));
}
-void ListModeBase::TellAlreadyOnList(User*, Channel*, std::string&)
+void ListModeBase::TellAlreadyOnList(User* source, Channel* channel, std::string& parameter)
{
+ source->WriteNumeric(ERR_LISTMODEALREADYSET, channel->name, parameter, mode, InspIRCd::Format("Channel %s list already contains %s", name.c_str(), parameter.c_str()));
}
-void ListModeBase::TellNotSet(User*, Channel*, std::string&)
+void ListModeBase::TellNotSet(User* source, Channel* channel, std::string& parameter)
{
+ source->WriteNumeric(ERR_LISTMODENOTSET, channel->name, parameter, mode, InspIRCd::Format("Channel %s list does not contain %s", name.c_str(), parameter.c_str()));
}
#include "listmode.h"
#include "modules/exemption.h"
-enum
-{
- // InspIRCd-specific.
- ERR_ALREADYCHANFILTERED = 937,
- ERR_NOSUCHCHANFILTER = 938
-};
-
/** Handles channel mode +g
*/
class ChanFilter : public ListModeBase
return true;
}
-
- void TellAlreadyOnList(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE
- {
- 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(ERR_NOSUCHCHANFILTER, chan->name, "No such spamfilter word is set");
- }
};
class ModuleChanFilter : public Module
return true;
}
-
- void TellAlreadyOnList(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE
- {
- user->WriteNumeric(957, chan->name, InspIRCd::Format("The word %s is already on the exemptchanops list", word.c_str()));
- }
-
- void TellNotSet(User* user, Channel* chan, std::string& word) CXX11_OVERRIDE
- {
- user->WriteNumeric(958, chan->name, "No such exemptchanops word is set");
- }
};
class ExemptHandler : public CheckExemption::EventListener