class ChanFilter : public ListModeBase
{
public:
- ChanFilter(Module* Creator) : ListModeBase(Creator, 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { }
+ ChanFilter(Module* Creator) : ListModeBase(Creator, "filter", 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { }
virtual bool ValidateParam(User* user, Channel* chan, std::string &word)
{
virtual ModResult ProcessMessages(User* user,Channel* chan,std::string &text)
{
- if (!IS_LOCAL(user) || (CHANOPS_EXEMPT('g') && chan->GetPrefixValue(user) == OP_VALUE))
+ ModResult res;
+ FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,chan,"filter"));
+
+ if (!IS_LOCAL(user) || res == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;
modelist* list = cf.extItem.get(chan);