diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-04-25 13:16:40 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-04-25 13:16:40 +0200 |
commit | 70ac122cba5c6a1df2b3ee29305d9a48098e7940 (patch) | |
tree | 7a8462e91b168d05d7f18211fa7dffd091df6561 /src/modules/m_spanningtree | |
parent | 657fcc1f6bcb025e7659577b13afdf4d88cce8a5 (diff) |
m_spanningtree Call the OnServerSplit hook from TreeServer::SQuitInternal() so it runs for all lost servers
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) |