diff options
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..."); |