mask.append("!*@*");
setban.push_back(mask);
- // use CallHandler to make it so that the user sets the mode
- // themselves
- ServerInstance->Parser->CallHandler("MODE",setban,user);
+ // Pass the user (instead of ServerInstance->FakeClient) to ModeHandler::Process() to
+ // make it so that the user sets the mode themselves
+ ServerInstance->Modes->Process(setban, user);
if (ServerInstance->Modes->GetLastParse().empty())
{
user->WriteNotice("Invalid ban mask");
void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
- Implementation eventlist[] = { I_OnBackgroundTimer };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
ServerInstance->Modes->AddModeWatcher(&banwatcher);
}