From 60ae49b62a371791ebbd9e4b131e33b857873f06 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 20 Dec 2018 14:48:24 +0100 Subject: Fix thinking that 1202 protocol servers have not finished bursting. A server introduction is only a burst if all of the parent servers of it are not bursting. Fixes #1527. --- src/modules/m_spanningtree/compat.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 8e5361b16..3e9485cfa 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -489,9 +489,19 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, Comm params[1].swap(params[3]); params.erase(params.begin()+2, params.begin()+4); - // If the source of this SERVER message is not bursting, then new servers it introduces are bursting - TreeServer* server = TreeServer::Get(who); - if (!server->IsBursting()) + // If the source of this SERVER message or any of its parents are bursting, then new servers it + // introduces are not bursting. + bool bursting = false; + for (TreeServer* server = TreeServer::Get(who); server; server = server->GetParent()) + { + if (server->IsBursting()) + { + bursting = true; + break; + } + } + + if (!bursting) params.insert(params.begin()+2, "burst=" + ConvToStr(((uint64_t)ServerInstance->Time())*1000)); } else if (cmd == "BURST") -- cgit v1.2.3