X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fserver.cpp;h=85204ccaac035b652e723ed56bd0e9ecbb147208;hb=226a95aab09b9e1f43f61e78179bfa1135816c2d;hp=05441da0c8780b27def709d5fcbc75ea252dbe33;hpb=f6aea98dc5c3d9e2e54cde5aaf3198eee3c1ebfb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 05441da0c..85204ccaa 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -19,11 +19,7 @@ #include "inspircd.h" -#include "socket.h" -#include "xline.h" -#include "socketengine.h" -#include "main.h" #include "utils.h" #include "link.h" #include "treeserver.h" @@ -55,7 +51,7 @@ bool TreeSocket::RemoteServer(const std::string &prefix, parameterlist ¶ms) this->SendError("Protocol error - Introduced remote server from unknown server "+prefix); return false; } - if (!ServerInstance->IsSID(sid)) + if (!InspIRCd::IsSID(sid)) { this->SendError("Invalid format server ID: "+sid+"!"); return false; @@ -105,17 +101,9 @@ bool TreeSocket::Outbound_Reply_Server(parameterlist ¶ms) std::string password = params[1]; std::string sid = params[3]; std::string description = params[4]; - int hops = atoi(params[2].c_str()); this->SendCapabilities(2); - if (hops) - { - this->SendError("Server too far away for authentication"); - ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, server is too far away for authentication"); - return false; - } - if (!ServerInstance->IsSID(sid)) { this->SendError("Invalid format server ID: "+sid+"!"); @@ -194,7 +182,7 @@ bool TreeSocket::CheckDuplicate(const std::string& sname, const std::string& sid } /* Check for fully initialized instances of the server by id */ - ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Looking for dupe SID %s", sid.c_str()); + ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Looking for dupe SID %s", sid.c_str()); CheckDupe = Utils->FindServerID(sid); if (CheckDupe) @@ -225,17 +213,9 @@ bool TreeSocket::Inbound_Server(parameterlist ¶ms) std::string password = params[1]; std::string sid = params[3]; std::string description = params[4]; - int hops = atoi(params[2].c_str()); this->SendCapabilities(2); - if (hops) - { - this->SendError("Server too far away for authentication"); - ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, server is too far away for authentication"); - return false; - } - if (!ServerInstance->IsSID(sid)) { this->SendError("Invalid format server ID: "+sid+"!");