diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-11 15:23:47 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-11 15:23:47 +0100 |
commit | f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d (patch) | |
tree | 5dff7a9e977464d9efc4e43824ece9e47e0a5ac1 /source/Root.cpp | |
parent | PrimaryServerVersion is not force-saved into settings.ini. (diff) | |
download | cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar.gz cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar.bz2 cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar.lz cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar.xz cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.tar.zst cuberite-f46d4bd5611a285d1c71e7ee56c7b6913fd28a2d.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Root.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/Root.cpp b/source/Root.cpp index c624ef9aa..1e901739f 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -96,10 +96,11 @@ void cRoot::Start(void) LOG("Creating new server instance..."); m_Server = new cServer(); - LOG("Starting server..."); + LOG("Reading server config..."); cIniFile IniFile("settings.ini"); - if ( IniFile.ReadFile() == false ) + if (!IniFile.ReadFile()) { + LOGINFO("settings.ini inaccessible, using settings.example.ini for defaults!"); IniFile.Path("settings.example.ini"); IniFile.ReadFile(); IniFile.Path("settings.ini"); @@ -115,8 +116,8 @@ void cRoot::Start(void) LOGINFO("settings.ini: [Server].PrimaryServerVersion set to %d.", m_PrimaryServerVersion); } - int Port = IniFile.GetValueSetI("Server", "Port", 25565 ); - if (!m_Server->InitServer(Port)) + LOG("Starting server..."); + if (!m_Server->InitServer(IniFile)) { LOGERROR("Failed to start server, shutting down."); return; |