diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-16 00:22:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-16 00:22:40 +0000 |
commit | 6aecd4c9ec0e09d04a6a5e59182a229b3c374b69 (patch) | |
tree | 977ddfd573ba052c32725102b39a529fd746076c | |
parent | c81f88939bc277fa92086b0ad77c90eb0994a6d3 (diff) |
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
-rw-r--r-- | src/cmd_quit.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 6 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd_quit.cpp b/src/cmd_quit.cpp index 097c8a68f..0065987cf 100644 --- a/src/cmd_quit.cpp +++ b/src/cmd_quit.cpp @@ -79,7 +79,6 @@ CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user) FOREACH_MOD(I_OnUserDisconnect,OnUserDisconnect(user)); - /* push the socket on a stack of sockets due to be closed at the next opportunity */ if (IS_LOCAL(user)) { ServerInstance->SE->DelFd(user); 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); |