summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-16 23:06:12 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-16 23:06:12 +0100
commit8ad774790267b7fc76e187a122e37e44dd222e64 (patch)
tree54b969accc23bcabd5b0724e369872d5f67d644d /source/Root.cpp
parentFixed boolean comparison. (diff)
downloadcuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar.gz
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar.bz2
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar.lz
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar.xz
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.tar.zst
cuberite-8ad774790267b7fc76e187a122e37e44dd222e64.zip
Diffstat (limited to 'source/Root.cpp')
-rw-r--r--source/Root.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index 52a0f46ce..1ec7f0e59 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -125,13 +125,19 @@ void cRoot::Start(void)
IniFile.WriteFile();
cIniFile WebIniFile("webadmin.ini");
- if( WebIniFile.ReadFile() )
+ if (!WebIniFile.ReadFile())
{
- if (WebIniFile.GetValueB("WebAdmin", "Enabled", false ))
- {
- LOG("Creating WebAdmin...");
- m_WebAdmin = new cWebAdmin(8080);
- }
+ LOGINFO("webadmin.ini inaccessible, using webadmin.example.ini for defaults!");
+ WebIniFile.Path("webadmin.example.ini");
+ WebIniFile.ReadFile();
+ WebIniFile.Path("webadmin.ini");
+ WebIniFile.WriteFile();
+ }
+
+ if (WebIniFile.GetValueB("WebAdmin", "Enabled", false ))
+ {
+ LOG("Creating WebAdmin...");
+ m_WebAdmin = new cWebAdmin(8080);
}
LOG("Loading settings...");