- void init()
- {
- ServerInstance->Modules->AddService(cmd);
- Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer, I_OnChannelDelete };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- }
-
- virtual ModResult OnDelBan(User* source, Channel* chan, const std::string &banmask)
- {
- irc::string listitem = banmask.c_str();
- irc::string thischan = chan->name.c_str();
- for (timedbans::iterator i = TimedBanList.begin(); i != TimedBanList.end(); i++)
- {
- irc::string target = i->mask.c_str();
- irc::string tchan = i->channel.c_str();
- if ((listitem == target) && (tchan == thischan))
- {
- TimedBanList.erase(i);
- break;
- }
- }
- return MOD_RES_PASSTHRU;
- }
-
- virtual void OnBackgroundTimer(time_t curtime)