From 6aecd4c9ec0e09d04a6a5e59182a229b3c374b69 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 16 Dec 2006 00:22:40 +0000 Subject: Fix setting of * for bans in m_messageflood, this has been broken for quite some time and nobody noticed? :P Spotted on barafranca, tested on chatspike. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6001 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_joinflood.cpp | 1 + src/modules/m_messageflood.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 983090d09..9ed3b1307 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -135,6 +135,7 @@ class JoinFlood : public ModeHandler else data++; } if (secs) + { /* Set up the flood parameters for this channel */ int njoins = atoi(joins); diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index be5dc68ae..9a9f684e5 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -144,7 +144,7 @@ class MsgFlood : public ModeHandler { if (!channel->GetExt("flood", f)) { - parameter = ConvToStr(nlines) + ":" +ConvToStr(nsecs); + parameter = std::string(ban ? "*" : "") + ConvToStr(nlines) + ":" +ConvToStr(nsecs); floodsettings *f = new floodsettings(ban,nsecs,nlines); channel->Extend("flood",f); channel->SetMode('f', true); @@ -153,11 +153,11 @@ class MsgFlood : public ModeHandler } else { - if (((nlines != f->lines) || (nsecs != f->secs)) && ((nsecs > 0) && (nlines > 0))) + if (((nlines != f->lines) || (nsecs != f->secs)) && ((nsecs > 0) && (nlines > 0)) || (ban != f->ban)) { delete f; floodsettings *f = new floodsettings(ban,nsecs,nlines); - parameter = ConvToStr(nlines) + ":" +ConvToStr(nsecs); + parameter = std::string(ban ? "*" : "") + ConvToStr(nlines) + ":" +ConvToStr(nsecs); channel->Shrink("flood"); channel->Extend("flood",f); channel->SetModeParam('f', parameter.c_str(), true); -- cgit v1.2.3