+
+ mf = new MsgFlood(ServerInstance);
+ if (!ServerInstance->Modes->AddMode(mf))
+ throw ModuleException("Could not add new modes!");
+ Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNotice, I_OnUserPreMessage };
+ ServerInstance->Modules->Attach(eventlist, this, 3);
+ }
+
+ int ProcessMessages(User* user,Channel* dest, const std::string &text)
+ {
+ if (!IS_LOCAL(user) || (CHANOPS_EXEMPT(ServerInstance, 'f') && dest->GetStatus(user) == STATUS_OP))
+ {
+ return 0;
+ }
+
+ floodsettings *f;
+ if (dest->GetExt("flood", f))