/** Holds settings and state associated with channel mode +F
*/
-class nickfloodsettings : public classbase
+class nickfloodsettings
{
public:
int secs;
{
if (!ServerInstance->Modes->AddMode(&nf))
throw ModuleException("Could not add new modes!");
- Extensible::Register(&nf.ext);
+ ServerInstance->Extensions.Register(&nf.ext);
Implementation eventlist[] = { I_OnUserPreNick, I_OnUserPostNick };
ServerInstance->Modules->Attach(eventlist, this, 2);
}
for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
Channel *channel = *i;
+ ModResult res;
nickfloodsettings *f = nf.ext.get(channel);
if (f)
{
- if (CHANOPS_EXEMPT('F') && channel->GetPrefixValue(user) == OP_VALUE)
+ FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood"));
+ if (res == MOD_RES_ALLOW)
continue;
if (f->islocked())
for (UCListIter i = user->chans.begin(); i != user->chans.end(); ++i)
{
Channel *channel = *i;
+ ModResult res;
nickfloodsettings *f = nf.ext.get(channel);
if (f)
{
- if (CHANOPS_EXEMPT('F') && channel->GetPrefixValue(user) == OP_VALUE)
+ FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood"));
+ if (res == MOD_RES_ALLOW)
return;
/* moved this here to avoid incrementing the counter for nick