summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-26 19:43:34 +0200
committermadmaxoft <github@xoft.cz>2013-10-26 19:43:34 +0200
commit52f88b9595f28c3c14ab1868dbed1eba1093c078 (patch)
treec8e9a5174269258e5a5caa9a1a8d22fe7475a3f7 /source/Root.cpp
parentcMonster: Improved doxycomments. (diff)
parentAPIDump: Documented cIniFile. (diff)
downloadcuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.gz
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.bz2
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.lz
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.xz
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.zst
cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.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");