diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 12:22:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 12:22:21 +0000 |
commit | f82cc8dd39fe97a9e91226b2aa892dcf036a5c0c (patch) | |
tree | 9228a1c02bef3a577a060798a2713842c6160a1c | |
parent | 25f6cb0fe66057f62c4c1d58beefe0595098897d (diff) |
chanrec::KickUser and chanrec::ServerKickUser return number of users left on the channel after the kick. If either returns 0, you should delete the chanrec immediately after return:
if (!c->KickUser(mysrc, mydest, "DIE"))
/* arse */
delete c;
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4783 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 51c68aeff..d3f8e9a21 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2896,7 +2896,9 @@ class TreeSocket : public InspSocket chanrec* chan = Srv->FindChannel(params[0]); if (user && chan) { - chan->ServerKickUser(user, params[2].c_str(), false); + if (!chan->ServerKickUser(user, params[2].c_str(), false)) + /* Yikes, the channels gone! */ + delete chan; } } if (this->InboundServerName != "") |