summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-25 11:15:44 +0200
committermadmaxoft <github@xoft.cz>2013-10-25 11:15:44 +0200
commit9e9198e0907d3d6fd353c683478007f418d86dd8 (patch)
tree9dd53b8f34532b135ae199e47a0e9e59d77a76f4 /source/Root.cpp
parentAPIDump: Documented cMonster. (diff)
downloadcuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar.gz
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar.bz2
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar.lz
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar.xz
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.tar.zst
cuberite-9e9198e0907d3d6fd353c683478007f418d86dd8.zip
Diffstat (limited to 'source/Root.cpp')
-rw-r--r--source/Root.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index 1f6437784..f47de972c 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -116,8 +116,8 @@ void cRoot::Start(void)
m_Server = new cServer();
LOG("Reading server config...");
- cIniFile IniFile("settings.ini");
- if (!IniFile.ReadFile())
+ cIniFile IniFile;
+ if (!IniFile.ReadFile("settings.ini"))
{
LOGWARNING("settings.ini inaccessible, all settings are reset to default values");
}
@@ -138,7 +138,7 @@ void cRoot::Start(void)
LOGERROR("Failure starting server, aborting...");
return;
}
- IniFile.WriteFile();
+ IniFile.WriteFile("settings.ini");
m_WebAdmin = new cWebAdmin();
m_WebAdmin->Init();
@@ -247,7 +247,8 @@ void cRoot::LoadGlobalSettings()
void cRoot::LoadWorlds(void)
{
- cIniFile IniFile("settings.ini"); IniFile.ReadFile();
+ cIniFile IniFile;
+ IniFile.ReadFile("settings.ini"); // Doesn't matter if success or not
// First get the default world
AString DefaultWorldName = IniFile.GetValueSet("Worlds", "DefaultWorld", "world");