From 35695871c45c3f3c73a02be463a20f11e61aaad5 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 9 Oct 2007 15:57:43 +0000 Subject: sanity check for existing server in DoFailOver seems to have vanished! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8138 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/utils.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 6385b7a12..abc251ab0 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -645,8 +645,16 @@ void SpanningTreeUtilities::DoFailOver(Link* x) Link* TryThisOne = this->FindLink(x->FailOver.c_str()); if (TryThisOne) { - Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); - Creator->ConnectServer(TryThisOne); + TreeServer* CheckDupe = this->FindServer(x->FailOver.c_str()); + if (CheckDupe) + { + ServerInstance->Log(DEBUG,"Skipping existing failover: %s", x->FailOver.c_str()); + } + else + { + Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str()); + Creator->ConnectServer(TryThisOne); + } } else { -- cgit v1.2.3