summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Root.cpp')
-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 );