From d0e13160c5d561622dfc222585ad5e73b9b0fcf6 Mon Sep 17 00:00:00 2001 From: special Date: Wed, 18 Jul 2007 14:31:00 +0000 Subject: Fixed m_messageflood to free the channel if it kicks the last user. This would cause either a crash or a memory leak, probably the latter git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7473 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_messageflood.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_messageflood.cpp') diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index a942262ed..2d0cd43fd 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -253,7 +253,8 @@ class ModuleMsgFlood : public Module } char kickmessage[MAXBUF]; snprintf(kickmessage, MAXBUF, "Channel flood triggered (limit is %d lines in %d secs)", f->lines, f->secs); - dest->ServerKickUser(user, kickmessage, true); + if (!dest->ServerKickUser(user, kickmessage, true)) + delete dest; } } } -- cgit v1.2.3