summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Server.cpp11
1 files changed, 6 insertions, 5 deletions
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<AString> cServer::GetUsernames()
+bool cServer::IsPlayerInQueue(AString a_Username)
{
- std::list<AString> 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;
}