From b3d33859b163854926b2e8c4f374e33055b7bad2 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 30 Mar 2008 22:42:42 +0000 Subject: Make sure CAPAB always comes before SERVER on either side of the link at all times git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9229 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/capab.cpp | 4 ++++ src/modules/m_spanningtree/server.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index d0ddc989e..aa69e2ee6 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -201,6 +201,7 @@ bool TreeSocket::Capab(const std::deque ¶ms) this->SetTheirChallenge(n->second); if (!this->GetTheirChallenge().empty() && (this->LinkState == CONNECTING)) { + this->SendCapabilities(); this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(OutboundPass, this->GetTheirChallenge())+" 0 "+ Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc); } @@ -209,7 +210,10 @@ bool TreeSocket::Capab(const std::deque ¶ms) { /* They didnt specify a challenge or we don't have m_sha256.so, we use plaintext */ if (this->LinkState == CONNECTING) + { + this->SendCapabilities(); this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 "+Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc); + } } if (reason.length()) diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index d98d73050..5213729a7 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -238,6 +238,7 @@ bool TreeSocket::Inbound_Server(std::deque ¶ms) // this is good. Send our details: Our server name and description and hopcount of 0, // along with the sendpass from this block. + this->SendCapabilities(); this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(x->SendPass, this->GetTheirChallenge())+" 0 "+Instance->Config->GetSID()+" :"+this->Instance->Config->ServerDesc); // move to the next state, we are now waiting for THEM. this->LinkState = WAIT_AUTH_2; -- cgit v1.2.3