summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_messageflood.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 7deb77a69..fc19217e5 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -154,6 +154,19 @@ class MsgFlood : public ModeHandler
channel->SetModeParam('f', parameter.c_str(), true);
return MODEACTION_ALLOW;
}
+ else
+ {
+ if (((nlines != f->lines) || (nsecs != f->secs)) && ((nsecs > 0) && (nlines > 0)))
+ {
+ delete f;
+ floodsettings *f = new floodsettings(ban,nsecs,nlines);
+ parameter = ConvToStr(nlines) + ":" +ConvToStr(nsecs);
+ channel->Shrink("flood");
+ channel->Extend("flood",f);
+ channel->SetModeParam('f', parameter.c_str(), true);
+ return MODEACTION_ALLOW;
+ }
+ }
}
}
else