From 177dde0d84ee385f9f172a058f314c5f4a4423fc Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 4 Jul 2012 20:34:51 +0200 Subject: m_spanningtree Netburst: Prefix SERVER and VERSION lines with SIDs instead of server names --- src/modules/m_spanningtree/netburst.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 2c9c687b8..8319dab8b 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -65,19 +65,18 @@ void TreeSocket::DoBurst(TreeServer* s) */ void TreeSocket::SendServers(TreeServer* Current, TreeServer* s, int hops) { - char command[1024]; + char command[MAXBUF]; for (unsigned int q = 0; q < Current->ChildCount(); q++) { TreeServer* recursive_server = Current->GetChild(q); if (recursive_server != s) { - std::string servername = Current->GetName(); std::string recursive_servername = recursive_server->GetName(); - snprintf(command,1024,":%s SERVER %s * %d %s :%s", servername.c_str(), recursive_servername.c_str(), hops, + snprintf(command, MAXBUF, ":%s SERVER %s * %d %s :%s", Current->GetID().c_str(), recursive_servername.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()); + this->WriteLine(":"+recursive_server->GetID()+" VERSION :"+recursive_server->GetVersion()); /* down to next level */ this->SendServers(recursive_server, s, hops+1); } -- cgit v1.2.3