From 3a89c8e89e6612c06eb91e68c30a280b8f593aa7 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 9 Apr 2007 17:11:33 +0000 Subject: Handle non-hmac servers smarter without having to globally turn off hmac git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6777 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 6c0418a0b..3ff981544 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -851,7 +851,7 @@ bool TreeSocket::Outbound_Reply_Server(std::deque ¶ms) std::string description = params[3]; for (std::vector::iterator x = Utils->LinkBlocks.begin(); x < Utils->LinkBlocks.end(); x++) { - if ((x->Name == servername) && (ComparePass(this->MakePass(x->RecvPass,this->GetOurChallenge()),password))) + if ((x->Name == servername) && ((ComparePass(this->MakePass(x->RecvPass,this->GetOurChallenge()),password)) || (x->RecvPass == password && (this->GetTheirChallenge().empty())))) { TreeServer* CheckDupe = Utils->FindServer(sname); if (CheckDupe) @@ -900,7 +900,7 @@ bool TreeSocket::Inbound_Server(std::deque ¶ms) std::string description = params[3]; for (std::vector::iterator x = Utils->LinkBlocks.begin(); x < Utils->LinkBlocks.end(); x++) { - if ((x->Name == servername) && (ComparePass(this->MakePass(x->RecvPass,this->GetOurChallenge()),password))) + if ((x->Name == servername) && ((ComparePass(this->MakePass(x->RecvPass,this->GetOurChallenge()),password) || x->RecvPass == password && (this->GetTheirChallenge().empty())))) { TreeServer* CheckDupe = Utils->FindServer(sname); if (CheckDupe) -- cgit v1.2.3