summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/server.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-27 18:05:36 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-27 18:05:36 +0200
commita7043cc3d3a30a7d8a14e9c12f3628836a2b1397 (patch)
tree45755a240f48527b8eac1674f91b00276df3dd4d /src/modules/m_spanningtree/server.cpp
parentac7e37c8542159fa0efa48b43c9ab346762f1638 (diff)
m_spanningtree Remove duplicated code from TreeSocket::Outbound_Reply_Server()
This is implemented in CheckDuplicate()
Diffstat (limited to 'src/modules/m_spanningtree/server.cpp')
-rw-r--r--src/modules/m_spanningtree/server.cpp15
1 files changed, 1 insertions, 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 &params)
continue;
}
- TreeServer* CheckDupe = Utils->FindServer(sname);
- if (CheckDupe)
- {
- std::string pname = CheckDupe->GetParent() ? CheckDupe->GetParent()->GetName() : "<ourself>";
- 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 <server:id> 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).