summaryrefslogtreecommitdiffstats
path: root/source/WebAdmin.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-13 22:19:13 +0200
committermadmaxoft <github@xoft.cz>2013-10-13 22:19:13 +0200
commit18bbe82f30af5f0ebb0b4789f386f5179ec56f2b (patch)
treefc2233a6ec0d0b233c4a6d3bd3a8ae34da90f115 /source/WebAdmin.cpp
parentFixed WebAdmin's request parameters. (diff)
downloadcuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar.gz
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar.bz2
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar.lz
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar.xz
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.tar.zst
cuberite-18bbe82f30af5f0ebb0b4789f386f5179ec56f2b.zip
Diffstat (limited to 'source/WebAdmin.cpp')
-rw-r--r--source/WebAdmin.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp
index daec2f925..316513f11 100644
--- a/source/WebAdmin.cpp
+++ b/source/WebAdmin.cpp
@@ -79,8 +79,14 @@ bool cWebAdmin::Init(void)
return false;
}
- AString PortsIPv4 = m_IniFile.GetValue("WebAdmin", "Port", "8080");
- AString PortsIPv6 = m_IniFile.GetValue("WebAdmin", "PortsIPv6", "");
+ if (!m_IniFile.GetValueSetB("WebAdmin", "Enabled", true))
+ {
+ // WebAdmin is disabled, bail out faking a success
+ return true;
+ }
+
+ AString PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", "8080");
+ AString PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", "");
if (!m_HTTPServer.Initialize(PortsIPv4, PortsIPv6))
{