diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 16:50:20 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 16:50:20 +0000 |
commit | cf1aa8c36d1349e26020f7041ea027ada4b50ba4 (patch) | |
tree | 57a50f874a079800b32c6fc135190545916b630e /src/modules/m_spanningtree | |
parent | 18310fc8b7dbb0dcda3f0fa10d2b37e2b1457c10 (diff) |
Use server names for introduction of servers, not SIDs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9401 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/server.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 5213729a7..02e1a364b 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -48,9 +48,10 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string> std::string sid = params[3]; std::string description = params[4]; TreeServer* ParentOfThis = Utils->FindServer(prefix); + if (!ParentOfThis) { - this->SendError("Protocol error - Introduced remote server from unknown server "+prefix); + this->SendError("Protocol error - Introduced remote server from unknown server "+ParentOfThis->GetName()); return false; } if (!this->Instance->IsSID(sid)) @@ -61,8 +62,8 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string> TreeServer* CheckDupe = Utils->FindServer(servername); if (CheckDupe) { - this->SendError("Server "+servername+" already exists!"); - this->Instance->SNO->WriteToSnoMask('l',"Server \2"+servername+"\2 being introduced from \2" + prefix + "\2 denied, already exists. Closing link with " + prefix); + this->SendError("Server "+CheckDupe->GetName()+" already exists!"); + this->Instance->SNO->WriteToSnoMask('l',"Server \2"+CheckDupe->GetName()+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, already exists. Closing link with " + ParentOfThis->GetName()); return false; } @@ -72,15 +73,15 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string> if (Node->DuplicateID()) { - this->SendError("Server ID "+sid+" already exists on the network!"); - this->Instance->SNO->WriteToSnoMask('l',"Server \2"+servername+"\2 being introduced from \2" + prefix + "\2 denied, server ID already exists on the network. Closing link with " + prefix); + this->SendError("Server ID "+servername+" already exists on the network!"); + this->Instance->SNO->WriteToSnoMask('l',"Server \2"+servername+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, server ID already exists on the network. Closing link with " + ParentOfThis->GetName()); return false; } ParentOfThis->AddChild(Node); params[4] = ":" + params[4]; Utils->DoOneToAllButSender(prefix,"SERVER",params,prefix); - this->Instance->SNO->WriteToSnoMask('l',"Server \002"+prefix+"\002 introduced server \002"+servername+"\002 ("+description+")"); + this->Instance->SNO->WriteToSnoMask('l',"Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")"); return true; } |