From 916b3e4005042099b9853b1c82fa1a2aeb87d26c Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 13 May 2007 17:47:53 +0000 Subject: Fix remote bursting with quietbursts, before QA actually test it :P (thanks HiroP) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7014 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 6 ++++++ src/modules/m_spanningtree/treesocket1.cpp | 3 --- src/modules/m_spanningtree/utils.cpp | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 4dc6eedc0..ab1908224 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -485,6 +485,12 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) } } } + + /* Cancel remote burst mode on any servers which still have it enabled due to latency/lack of data. + * This prevents lost REMOTECONNECT notices + */ + for (server_hash::iterator i = Utils->serverlist.begin(); i != Utils->serverlist.end(); i++) + Utils->SetRemoteBursting(i->second, false); } void ModuleSpanningTree::ConnectServer(Link* x) diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index b8bc03c2c..80799ca7a 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -963,9 +963,6 @@ bool TreeSocket::IntroduceClient(const std::string &source, std::dequeAddGlobalClone(_new); bool dosend = !(((this->Utils->quiet_bursts) && (this->bursting || Utils->FindRemoteBurstServer(remoteserver))) || (this->Instance->SilentULine(_new->server))); - - Instance->Log(DEBUG,"SNOMASK send state: dosend=%d, quiet_bursts = %d, this->bursting = %d, FRBS=%d, silentuline=%d", - dosend, this->Utils->quiet_bursts, this->bursting, Utils->FindRemoteBurstServer(remoteserver) != NULL, this->Instance->SilentULine(_new->server)); if (dosend) this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s] [%s]",_new->server,_new->nick,_new->ident,_new->host, _new->GetIPString(), _new->fullname); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 0545f441c..03065d831 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -81,13 +81,13 @@ void SpanningTreeUtilities::SetRemoteBursting(TreeServer* Server, bool bursting) if (bursting) { if (iter == RemoteServersBursting.end()) - RemoteServersBursting.erase(iter); + RemoteServersBursting.insert(make_pair(Server->GetName(), Server)); else return; } else { if (iter != RemoteServersBursting.end()) - RemoteServersBursting.insert(make_pair(Server->GetName(), Server)); + RemoteServersBursting.erase(iter); else return; } ServerInstance->Log(DEBUG,"Server %s is %sbursting nicknames", Server->GetName().c_str(), bursting ? "" : "no longer "); -- cgit v1.2.3