setban.push_back(parameters[0]);
setban.push_back("+b");
setban.push_back(parameters[2]);
- // use CallCommandHandler to make it so that the user sets the mode
+ // use CallHandler to make it so that the user sets the mode
// themselves
- ServerInstance->CallCommandHandler("MODE",setban,user);
+ ServerInstance->Parser->CallHandler("MODE",setban,user);
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
if (!strcasecmp(i->data.c_str(), mask.c_str()))
goto found;
ModuleTimedBans()
: cmd(this)
{
- ServerInstance->AddCommand(&cmd);
- TimedBanList.clear();
- Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
- ServerInstance->Modules->Attach(eventlist, this, 2);
}
- virtual ~ModuleTimedBans()
+ void init()
{
- TimedBanList.clear();
+ ServerInstance->Modules->AddService(cmd);
+ Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ModResult OnDelBan(User* source, Channel* chan, const std::string &banmask)