From e832736e0bf315585f873b43520d1d771930a1c2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 4 Nov 2013 21:51:24 +0000 Subject: Autogeneration of settings.ini and webadmin.ini Fixes issue #75 --- source/Server.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/Server.cpp') diff --git a/source/Server.cpp b/source/Server.cpp index 879bfae5a..380c7416e 100644 --- a/source/Server.cpp +++ b/source/Server.cpp @@ -195,8 +195,9 @@ void cServer::PlayerDestroying(const cPlayer * a_Player) bool cServer::InitServer(cIniFile & a_SettingsIni) { - m_Description = a_SettingsIni.GetValue ("Server", "Description", "MCServer! - In C++!").c_str(); - m_MaxPlayers = a_SettingsIni.GetValueI("Server", "MaxPlayers", 100); + m_Description = a_SettingsIni.GetValueSet("Server", "Description", "MCServer - The Minecraft server in C++!").c_str(); + m_MaxPlayers = a_SettingsIni.GetValueSetI("Server", "MaxPlayers", 100); + m_bIsHardcore = a_SettingsIni.GetValueSetB("Server", "HardcoreEnabled"); m_PlayerCount = 0; m_PlayerCountDiff = 0; @@ -320,7 +321,7 @@ void cServer::OnConnectionAccepted(cSocket & a_Socket) return; } - LOG("Client \"%s\" connected!", ClientIP.c_str()); + LOGD("Client \"%s\" connected!", ClientIP.c_str()); cClientHandle * NewHandle = new cClientHandle(&a_Socket, m_ClientViewDistance); if (!m_SocketThreads.AddClient(a_Socket, NewHandle)) @@ -507,7 +508,7 @@ void cServer::BindBuiltInConsoleCommands(void) PlgMgr->BindConsoleCommand("chunkstats", NULL, " - Displays detailed chunk memory statistics"); #if defined(_MSC_VER) && defined(_DEBUG) && defined(ENABLE_LEAK_FINDER) PlgMgr->BindConsoleCommand("dumpmem", NULL, " - Dumps all used memory blocks together with their callstacks into memdump.xml"); - #endif + #endif } -- cgit v1.2.3