summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorVincent <vincent.leung60@gmail.com>2014-12-08 09:45:29 +0100
committerVincent <vincent.leung60@gmail.com>2014-12-08 09:45:29 +0100
commit6de07d4a39096f19c075695824aa87a1907e4edc (patch)
treedc054c1be5c63b9b2303c208e8c8ad83eb37fcee /src/Server.cpp
parentremoved last space in handlehandshake (diff)
downloadcuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar.gz
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar.bz2
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar.lz
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar.xz
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.tar.zst
cuberite-6de07d4a39096f19c075695824aa87a1907e4edc.zip
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;
}