public:
User_d(Module* Creator) : ModeHandler(Creator, "deaf", 'd', PARAM_NONE, MODETYPE_USER) { }
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE
{
if (adding == dest->IsModeSet(this))
return MODEACTION_DENY;
deaf_bypasschars_uline = tag->getString("bypasscharsuline");
}
- ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
+ ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE
{
- if (target_type != TYPE_CHANNEL)
+ if (target.type != MessageTarget::TYPE_CHANNEL)
return MOD_RES_PASSTHRU;
- Channel* chan = static_cast<Channel*>(dest);
- bool is_bypasschar = (deaf_bypasschars.find(text[0]) != std::string::npos);
- bool is_bypasschar_uline = (deaf_bypasschars_uline.find(text[0]) != std::string::npos);
+ Channel* chan = target.Get<Channel>();
+ bool is_bypasschar = (deaf_bypasschars.find(details.text[0]) != std::string::npos);
+ bool is_bypasschar_uline = (deaf_bypasschars_uline.find(details.text[0]) != std::string::npos);
/*
* If we have no bypasschars_uline in config, and this is a bypasschar (regular)
continue; /* deliver message */
/* don't deliver message! */
- exempt_list.insert(i->first);
+ details.exemptions.insert(i->first);
}
return MOD_RES_PASSTHRU;