From a7043cc3d3a30a7d8a14e9c12f3628836a2b1397 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 27 Jul 2014 18:05:36 +0200 Subject: m_spanningtree Remove duplicated code from TreeSocket::Outbound_Reply_Server() This is implemented in CheckDuplicate() --- src/modules/m_spanningtree/server.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index f232d57d6..73f36f37f 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -109,21 +109,8 @@ bool TreeSocket::Outbound_Reply_Server(parameterlist ¶ms) continue; } - TreeServer* CheckDupe = Utils->FindServer(sname); - if (CheckDupe) - { - std::string pname = CheckDupe->GetParent() ? CheckDupe->GetParent()->GetName() : ""; - SendError("Server "+sname+" already exists on server "+pname+"!"); - ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, already exists on server "+pname); - return false; - } - CheckDupe = Utils->FindServer(sid); - if (CheckDupe) - { - this->SendError("Server ID "+sid+" already exists on the network! You may want to specify the server ID for the server manually with so they do not conflict."); - ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+assign(servername)+"\2 being introduced denied, server ID already exists on the network. Closing link."); + if (!CheckDuplicate(sname, sid)) return false; - } /* * They're in WAIT_AUTH_2 (having accepted our credentials). -- cgit v1.2.3