From 6de07d4a39096f19c075695824aa87a1907e4edc Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 00:45:29 -0800 Subject: Fixed compile errors --- src/Server.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/Server.cpp') diff --git a/src/Server.cpp b/src/Server.cpp index 15c9521b9..a1dd27c57 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -304,16 +304,17 @@ int cServer::GetNumPlayers(void) const -std::list cServer::GetUsernames() +bool cServer::IsPlayerInQueue(AString a_Username) { - std::list usernames; cCSLock Lock(m_CSClients); for (auto client : m_Clients) { - AString username = (client)->GetUsername(); - usernames.insert(usernames.begin(),username); + if ((client->GetUsername()).compare(a_Username) == 0) + { + return true; + } } - return usernames; + return false; } -- cgit v1.2.3