diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-04 20:34:51 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-10-03 00:30:00 +0200 |
commit | 177dde0d84ee385f9f172a058f314c5f4a4423fc (patch) | |
tree | 745ada72299857ea1ac2b3e4150a122a1783b5e1 /src/modules | |
parent | 7656b6656582e5064f8ab1c6cf4a246a017999d1 (diff) |
m_spanningtree Netburst: Prefix SERVER and VERSION lines with SIDs instead of server names
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 7 |
1 files 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); } |