From fa76bbab4cbbdb83fe414bc81f58f3ee7dbdaefe Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 9 Apr 2011 12:04:27 +0000 Subject: [PATCH] some more server list work --- src/serverlist.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 35703d67..85b86582 100755 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -173,17 +173,24 @@ void CServerListManager::QueryServerList ( const CHostAddress& InetAddr ) // copy the list (we have to copy it since the message requires // a vector but the list is actually stored in a QList object and // not in a vector object - for ( int iIdx = 1; iIdx < iCurServerListSize; iIdx++ ) + for ( int iIdx = 0; iIdx < iCurServerListSize; iIdx++ ) { + // copy list item vecServerInfo[iIdx] = ServerList[iIdx]; + + // create "send empty message" for all registered servers (except + // of the very first list entry since this is this server (central + // server) per definition) + if ( iIdx > 0 ) + { + pConnLessProtocol->CreateCLSendEmptyMesMes ( + vecServerInfo[iIdx].HostAddr, + InetAddr ); + } } // send the server list to the client pConnLessProtocol->CreateCLServerListMes ( InetAddr, vecServerInfo ); - - -// TODO create "send empty message" for all registered servers - } }