diff options
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 3 | ||||
-rw-r--r-- | 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::deque<std::stri Instance->AddGlobalClone(_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 "); |