summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-05 00:19:35 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-05 00:19:35 +0000
commitddb0e734b5fa6edc36747893ec3759a7fc2ebb05 (patch)
tree658955f98876e0ac6c940cecdfc0067de24b86ec /src
parentcc463cdd983e429abee0f9221801402372853f61 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp12
1 files changed, 12 insertions, 0 deletions
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