From 002a4dec73f5667dfc712398be895b8913e0d23d Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Sep 2006 17:51:01 +0000 Subject: Fix m_messageflood along same lines as m_joinflood (jamie forgot a patch, i figured this one out for myself) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5225 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_messageflood.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/modules') 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 -- cgit v1.2.3