summaryrefslogtreecommitdiffstats
path: root/src/WebAdmin.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-07 19:45:15 +0200
committerMattes D <github@xoft.cz>2014-09-07 19:45:15 +0200
commitd2c1518145932bf6ef3cf30feac8d5698a77bf7e (patch)
tree5271b95fa6b367ac54da912d40d0f256adbf837c /src/WebAdmin.cpp
parentWebAdmin: Added HTTPS instructions when cert / key is missing. (diff)
downloadcuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar.gz
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar.bz2
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar.lz
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar.xz
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.tar.zst
cuberite-d2c1518145932bf6ef3cf30feac8d5698a77bf7e.zip
Diffstat (limited to 'src/WebAdmin.cpp')
-rw-r--r--src/WebAdmin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp
index 341c64236..db2ace386 100644
--- a/src/WebAdmin.cpp
+++ b/src/WebAdmin.cpp
@@ -43,6 +43,8 @@ public:
cWebAdmin::cWebAdmin(void) :
m_IsInitialized(false),
m_IsRunning(false),
+ m_PortsIPv4("8080"),
+ m_PortsIPv6(""),
m_TemplateScript("<webadmin_template>")
{
}
@@ -89,6 +91,8 @@ bool cWebAdmin::Init(void)
m_IniFile.AddHeaderComment(" Password format: Password=*password*; for example:");
m_IniFile.AddHeaderComment(" [User:admin]");
m_IniFile.AddHeaderComment(" Password=admin");
+ m_IniFile.SetValue("WebAdmin", "Port", m_PortsIPv4);
+ m_IniFile.SetValue("WebAdmin", "PortsIPv6", m_PortsIPv6);
m_IniFile.WriteFile("webadmin.ini");
}
@@ -100,8 +104,8 @@ bool cWebAdmin::Init(void)
LOGD("Initialising WebAdmin...");
- m_PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", "8080");
- m_PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", "");
+ m_PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", m_PortsIPv4);
+ m_PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", m_PortsIPv6);
if (!m_HTTPServer.Initialize(m_PortsIPv4, m_PortsIPv6))
{