diff options
author | Vincent <vincent.leung60@gmail.com> | 2014-11-29 09:36:15 +0100 |
---|---|---|
committer | Vincent <vincent.leung60@gmail.com> | 2014-11-29 09:36:15 +0100 |
commit | 61e761fdc2bfa5c77002d68bb24e0470def37b48 (patch) | |
tree | efb8e5a7b544f9402d186201c1f9150511bcc1a9 /src/Server.cpp | |
parent | Merge pull request #1619 from mc-server/WarningFixes (diff) | |
download | cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.gz cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.bz2 cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.lz cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.xz cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.zst cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Server.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index bbb5ecff3..157bad43e 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -201,6 +201,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; @@ -303,6 +304,22 @@ int cServer::GetNumPlayers(void) const +std::list<std::string> cServer::GetUsernames() +{ + std::list<std::string> usernames; + cCSLock Lock(m_CSClients); + for (ClientList::iterator itr = m_Clients.begin(); itr != m_Clients.end(); ++itr) + { + std::string username = (*itr)->GetUsername(); + usernames.insert(usernames.begin(),username); + } + return usernames; +} + + + + + void cServer::PrepareKeys(void) { LOGD("Generating protocol encryption keypair..."); |