- floodsettings *f = new floodsettings(ban,nlines,nsecs);
- c->Extend("flood",(char*)f);
+ // mode params match
+ return MODEACTION_DENY;
+ }
+ else
+ {
+ if (((nlines != f->lines) || (nsecs != f->secs)) && ((nsecs > 0) && (nlines > 0)) || (ban != f->ban))
+ {
+ delete f;
+ floodsettings *fs = new floodsettings(ban,nsecs,nlines);
+ channel->Shrink("flood");
+ channel->Extend("flood",fs);
+ channel->SetModeParam('f', cur_param.c_str(), false);
+ channel->SetModeParam('f', parameter.c_str(), true);
+ return MODEACTION_ALLOW;
+ }
+ else
+ {
+ return MODEACTION_DENY;
+ }