diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index f419f9bec..9c53a16cd 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -268,7 +268,9 @@ void TreeSocket::SendServers(TreeServer* Current, TreeServer* s, int hops) TreeServer* recursive_server = Current->GetChild(q); if (recursive_server != s) { - snprintf(command,1024,":%s SERVER %s * %d :%s",Current->GetName().c_str(),recursive_server->GetName().c_str(),hops,recursive_server->GetDesc().c_str()); + snprintf(command,1024,":%s SERVER %s * %d %s :%s",Current->GetName().c_str(),recursive_server->GetName().c_str(),hops, + recursive_server->GetID().c_str(), + recursive_server->GetDesc().c_str()); this->WriteLine(command); this->WriteLine(":"+recursive_server->GetName()+" VERSION :"+recursive_server->GetVersion()); /* down to next level */ @@ -432,6 +434,12 @@ bool TreeSocket::Capab(const std::deque<std::string> ¶ms) } else if (params[0] == "END") { + std::string OurSID; + + OurSID += (char)((Instance->Config->sid / 100) + 48); + OurSID += (char)((Instance->Config->sid / 10) % 10 + 48); + OurSID += (char)(Instance->Config->sid % 10 + 48); + std::string reason; int ip6support = 0; #ifdef SUPPORT_IP6LINKS @@ -503,14 +511,15 @@ bool TreeSocket::Capab(const std::deque<std::string> ¶ms) this->SetTheirChallenge(n->second); if (!this->GetTheirChallenge().empty() && (this->LinkState == CONNECTING)) { - this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(OutboundPass, this->GetTheirChallenge())+" 0 :"+this->Instance->Config->ServerDesc); + this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+this->MakePass(OutboundPass, this->GetTheirChallenge())+" 0 "+ + OurSID+" :"+this->Instance->Config->ServerDesc); } } else { /* They didnt specify a challenge or we don't have m_sha256.so, we use plaintext */ if (this->LinkState == CONNECTING) - this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 :"+this->Instance->Config->ServerDesc); + this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+OutboundPass+" 0 "+OurSID+" :"+this->Instance->Config->ServerDesc); } if (reason.length()) |