From ddb0e734b5fa6edc36747893ec3759a7fc2ebb05 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 5 Sep 2006 00:19:35 +0000 Subject: This is a complex one: when autoconnecting, we check each links failover, and try and FindServer it. If we find that link's failover in the network, we dont try and autoconnect it as it probably established a link to that via another route anyway. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5144 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index e1895f4b2..9c27ee7f5 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -4123,6 +4123,18 @@ class ModuleSpanningTree : public Module ServerInstance->Log(DEBUG,"Auto-Connecting %s",x->Name.c_str()); x->NextConnectTime = curtime + x->AutoConnect; TreeServer* CheckDupe = FindServer(x->Name.c_str()); + if (x->FailOver.length()) + { + TreeServer* CheckFailOver = FindServer(x->FailOver.c_str()); + if (CheckFailOver) + { + /* The failover for this server is currently a member of the network. + * The failover probably succeeded, where the main link did not. + * Don't try the main link until the failover is gone again. + */ + continue; + } + } if (!CheckDupe) { // an autoconnected server is not connected. Check if its time to connect it -- cgit v1.2.3