From 92eda175245c3d3da6b41af5c52d1540a23a0dc3 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 6 Apr 2008 12:04:20 +0000 Subject: Fix a silly bug we never thought was a bug, in m_messageflood - the message that got a user kicked was always allowed through (appearing *after* they were kicked). Was a return 1 in the wrong place. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9372 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_messageflood.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index c506a2fb7..7122c535b 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -240,13 +240,16 @@ class ModuleMsgFlood : public Module ServerInstance->PI->SendModeStr(dest->name, std::string("+b ") + user->MakeWildHost()); } + char kickmessage[MAXBUF]; snprintf(kickmessage, MAXBUF, "Channel flood triggered (limit is %d lines in %d secs)", f->lines, f->secs); + if (!dest->ServerKickUser(user, kickmessage, true)) { delete dest; - return 1; } + + return 1; } } -- cgit v1.2.3