diff options
author | Mattes D <github@xoft.cz> | 2014-12-10 11:17:11 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-10 11:17:11 +0100 |
commit | 32bce44f1f6167bfce5deaa084e7dd90f71e39e2 (patch) | |
tree | 33315fbd4cda5b3be615f763deca3a8f660ead8f /src/Server.cpp | |
parent | Fixed compiling. (diff) | |
parent | Changed method call to DoesAllowMultiLogin() instead of IsAllowMultiLogin() (diff) | |
download | cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar.gz cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar.bz2 cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar.lz cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar.xz cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.tar.zst cuberite-32bce44f1f6167bfce5deaa084e7dd90f71e39e2.zip |
Diffstat (limited to 'src/Server.cpp')
-rw-r--r-- | src/Server.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index d6163df7e..3eaf6e096 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -196,6 +196,7 @@ bool cServer::InitServer(cIniFile & a_SettingsIni, bool a_ShouldAuth) m_Description = a_SettingsIni.GetValueSet("Server", "Description", "MCServer - in C++!"); m_MaxPlayers = a_SettingsIni.GetValueSetI("Server", "MaxPlayers", 100); m_bIsHardcore = a_SettingsIni.GetValueSetB("Server", "HardcoreEnabled", false); + m_bAllowMultiLogin = a_SettingsIni.GetValueSetB("Server", "AllowMultiLogin", false); m_PlayerCount = 0; m_PlayerCountDiff = 0; @@ -298,6 +299,23 @@ int cServer::GetNumPlayers(void) const +bool cServer::IsPlayerInQueue(AString a_Username) +{ + cCSLock Lock(m_CSClients); + for (auto client : m_Clients) + { + if ((client->GetUsername()).compare(a_Username) == 0) + { + return true; + } + } + return false; +} + + + + + void cServer::PrepareKeys(void) { LOGD("Generating protocol encryption keypair..."); |