From 70ac122cba5c6a1df2b3ee29305d9a48098e7940 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 25 Apr 2016 13:16:40 +0200 Subject: m_spanningtree Call the OnServerSplit hook from TreeServer::SQuitInternal() so it runs for all lost servers --- src/modules/m_spanningtree/treeserver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/treeserver.cpp') diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 1fc9455b0..b3430e1ab 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -159,8 +159,6 @@ void TreeServer::FinishBurst() void TreeServer::SQuitChild(TreeServer* server, const std::string& reason) { - if (!Utils->Creator->dying) - FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (server)); stdalgo::erase(Children, server); if (IsRoot()) @@ -205,6 +203,9 @@ void TreeServer::SQuitInternal(unsigned int& num_lost_servers) isdead = true; num_lost_servers++; RemoveHash(); + + if (!Utils->Creator->dying) + FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (this)); } unsigned int TreeServer::QuitUsers(const std::string& reason) -- cgit v1.2.3