* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
return (their_param < our_param);
}
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
nickfloodsettings* dummy;
{
nickfloodsettings *f;
channel->GetExt("nickflood", f);
- DELETE(f);
+ delete f;
channel->Shrink("nickflood");
channel->SetMode('F', false);
return MODEACTION_ALLOW;
{
jf = new NickFlood(ServerInstance);
- if (!ServerInstance->AddMode(jf, 'F'))
+ if (!ServerInstance->Modes->AddMode(jf))
throw ModuleException("Could not add new modes!");
+ Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNick };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual int OnUserPreNick(User* user, const std::string &newnick)
nickfloodsettings *f;
if (chan->GetExt("nickflood",f))
{
- DELETE(f);
+ delete f;
chan->Shrink("nickflood");
}
}
- void Implements(char* List)
- {
- List[I_OnChannelDelete] = List[I_OnUserPreNick] = 1;
- }
virtual ~ModuleNickFlood()
{
ServerInstance->Modes->DelMode(jf);
- DELETE(jf);
+ delete jf;
}
virtual Version GetVersion()