summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 17:47:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 17:47:53 +0000
commit916b3e4005042099b9853b1c82fa1a2aeb87d26c (patch)
tree1640612fdeb62dc61e79ef64c0cac43666f7540f
parentf45f5c17f03e2303e26f93083eb97ec08bef7d78 (diff)
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
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp3
-rw-r--r--src/modules/m_spanningtree/utils.cpp4
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 ");