diff options
author | Mattes D <github@xoft.cz> | 2013-11-05 22:24:23 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-11-05 22:24:23 +0100 |
commit | 12eeb3f6c88f54b77363923fcff2bd4ce53ff07f (patch) | |
tree | 3ed83d1132a2b1a8b6f9e36a7d6f3a527d258992 /source/WebAdmin.cpp | |
parent | Clarified cBlockHandler::ConvertToPickups() dox. (diff) | |
parent | Implemented suggestions (diff) | |
download | cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.gz cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.bz2 cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.lz cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.xz cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.zst cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.zip |
Diffstat (limited to '')
-rw-r--r-- | source/WebAdmin.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 8c95e4e21..7a1d332a5 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -56,7 +56,7 @@ cWebAdmin::~cWebAdmin() { if (m_IsInitialized) { - LOG("Stopping WebAdmin..."); + LOGD("Stopping WebAdmin..."); } } @@ -87,7 +87,11 @@ bool cWebAdmin::Init(void) { if (!m_IniFile.ReadFile("webadmin.ini")) { - return false; + LOGWARN("Regenerating webadmin.ini, all settings will be reset"); + m_IniFile.AddHeaderComment(" This file controls the webadmin feature of MCServer"); + m_IniFile.AddHeaderComment(" Username format: [User:*username*] | Password format: Password=*password*; for example:"); + m_IniFile.AddHeaderComment(" [User:admin]"); + m_IniFile.AddHeaderComment(" Password=admin"); } if (!m_IniFile.GetValueSetB("WebAdmin", "Enabled", true)) @@ -96,7 +100,7 @@ bool cWebAdmin::Init(void) return true; } - LOG("Initialising WebAdmin..."); + LOGD("Initialising WebAdmin..."); AString PortsIPv4 = m_IniFile.GetValueSet("WebAdmin", "Port", "8080"); AString PortsIPv6 = m_IniFile.GetValueSet("WebAdmin", "PortsIPv6", ""); @@ -106,6 +110,7 @@ bool cWebAdmin::Init(void) return false; } m_IsInitialized = true; + m_IniFile.WriteFile("webadmin.ini"); return true; } @@ -121,7 +126,7 @@ bool cWebAdmin::Start(void) return false; } - LOG("Starting WebAdmin..."); + LOGD("Starting WebAdmin..."); // Initialize the WebAdmin template script and load the file m_TemplateScript.Create(); |