diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-13 17:51:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-13 17:51:01 +0000 |
commit | 002a4dec73f5667dfc712398be895b8913e0d23d (patch) | |
tree | 83f53fb8957367e8db198f32e72558a4a7bafdc9 | |
parent | 28a4e0417edba9d9ca846d46a8875f20020962b2 (diff) |
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
-rw-r--r-- | src/modules/m_messageflood.cpp | 13 |
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 |