diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-11 15:15:59 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-11 15:15:59 +0100 |
commit | 83b949f4909868a7895b5fdaae47dbca0720c806 (patch) | |
tree | 3a95780df435afd7240e26fe65501b33909d7be1 /source/Root.cpp | |
parent | Cleanup: Removed deprecated functions from Lua API (diff) | |
download | cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar.gz cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar.bz2 cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar.lz cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar.xz cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.tar.zst cuberite-83b949f4909868a7895b5fdaae47dbca0720c806.zip |
Diffstat (limited to 'source/Root.cpp')
-rw-r--r-- | source/Root.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/Root.cpp b/source/Root.cpp index bef960afd..c624ef9aa 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -81,7 +81,7 @@ void cRoot::InputThread(void * a_Params) -void cRoot::Start() +void cRoot::Start(void) { delete m_Log; m_Log = new cMCLogger(); @@ -104,12 +104,21 @@ void cRoot::Start() IniFile.ReadFile(); IniFile.Path("settings.ini"); } - m_PrimaryServerVersion = IniFile.GetValueSetI("Server", "PrimaryServerVersion", cProtocolRecognizer::PROTO_VERSION_1_4_2); + m_PrimaryServerVersion = IniFile.GetValueI("Server", "PrimaryServerVersion", 0); + if (m_PrimaryServerVersion == 0) + { + m_PrimaryServerVersion = cProtocolRecognizer::PROTO_VERSION_LATEST; + } + else + { + // Make a note in the log that the primary server version is explicitly set in the ini file + LOGINFO("settings.ini: [Server].PrimaryServerVersion set to %d.", m_PrimaryServerVersion); + } int Port = IniFile.GetValueSetI("Server", "Port", 25565 ); if (!m_Server->InitServer(Port)) { - LOG("Failed to start server, shutting down."); + LOGERROR("Failed to start server, shutting down."); return; } IniFile.WriteFile(); |