summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-10 16:13:09 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-10 16:13:09 +0100
commit727446f6d52c3b986711adf581a5bf057701aae1 (patch)
tree78eb08a4afbab41ac269d9d8d83899a5cc422c28
parentFixed a bug introduced in rev 1023 (ThuGie's crash) (diff)
downloadcuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar.gz
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar.bz2
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar.lz
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar.xz
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.tar.zst
cuberite-727446f6d52c3b986711adf581a5bf057701aae1.zip
-rw-r--r--source/Root.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index d8b929102..bef960afd 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -98,7 +98,12 @@ void cRoot::Start()
LOG("Starting server...");
cIniFile IniFile("settings.ini");
- IniFile.ReadFile();
+ if ( IniFile.ReadFile() == false )
+ {
+ IniFile.Path("settings.example.ini");
+ IniFile.ReadFile();
+ IniFile.Path("settings.ini");
+ }
m_PrimaryServerVersion = IniFile.GetValueSetI("Server", "PrimaryServerVersion", cProtocolRecognizer::PROTO_VERSION_1_4_2);
int Port = IniFile.GetValueSetI("Server", "Port", 25565 );