diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-18 14:31:00 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-18 14:31:00 +0000 |
commit | d0e13160c5d561622dfc222585ad5e73b9b0fcf6 (patch) | |
tree | 0a424a7026e8e21d64cdb0c9f9432a55d66bb496 /src/modules/m_messageflood.cpp | |
parent | fed58f5c25915d60d40c0f407914ff7381902f9d (diff) |
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
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r-- | src/modules/m_messageflood.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } } } |