diff options
author | madmaxoft <github@xoft.cz> | 2013-10-18 12:50:35 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-18 12:50:50 +0200 |
commit | e6bb025a9fc0beafc65aa8131d8836105b3b2943 (patch) | |
tree | 5df6abd658c726893f3eaa594dc474f1a0c05072 /source | |
parent | Merge pull request #253 from SamJBarney/master (diff) | |
download | cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar.gz cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar.bz2 cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar.lz cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar.xz cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.tar.zst cuberite-e6bb025a9fc0beafc65aa8131d8836105b3b2943.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/Root.cpp | 3 | ||||
-rw-r--r-- | source/WebAdmin.cpp | 16 | ||||
-rw-r--r-- | source/WebAdmin.h | 1 |
3 files changed, 17 insertions, 3 deletions
diff --git a/source/Root.cpp b/source/Root.cpp index 290a5269a..1f6437784 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -140,7 +140,6 @@ void cRoot::Start(void) } IniFile.WriteFile(); - LOG("Initialising WebAdmin..."); m_WebAdmin = new cWebAdmin(); m_WebAdmin->Init(); @@ -172,7 +171,6 @@ void cRoot::Start(void) LOGD("Finalising startup..."); m_Server->Start(); - LOG("Starting WebAdmin..."); m_WebAdmin->Start(); #if !defined(ANDROID_NDK) @@ -210,7 +208,6 @@ void cRoot::Start(void) LOGD("Freeing MonsterConfig..."); delete m_MonsterConfig; m_MonsterConfig = NULL; - LOGD("Stopping WebAdmin..."); delete m_WebAdmin; m_WebAdmin = NULL; LOGD("Unloading recipes..."); delete m_FurnaceRecipe; m_FurnaceRecipe = NULL; diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 316513f11..393e5ce52 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -53,6 +53,18 @@ cWebAdmin::cWebAdmin(void) : +cWebAdmin::~cWebAdmin() +{ + if (m_IsInitialized) + { + LOG("Stopping WebAdmin..."); + } +} + + + + + void cWebAdmin::AddPlugin( cWebPlugin * a_Plugin ) { m_Plugins.remove( a_Plugin ); @@ -79,6 +91,8 @@ bool cWebAdmin::Init(void) return false; } + LOG("Initialising WebAdmin..."); + if (!m_IniFile.GetValueSetB("WebAdmin", "Enabled", true)) { // WebAdmin is disabled, bail out faking a success @@ -108,6 +122,8 @@ bool cWebAdmin::Start(void) return false; } + LOG("Starting WebAdmin..."); + // Initialize the WebAdmin template script and load the file m_TemplateScript.Create(); if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua")) diff --git a/source/WebAdmin.h b/source/WebAdmin.h index 72c77ddfb..488cec274 100644 --- a/source/WebAdmin.h +++ b/source/WebAdmin.h @@ -106,6 +106,7 @@ public: cWebAdmin(void); + ~cWebAdmin(); /// Initializes the object. Returns true if successfully initialized and ready to start bool Init(void); |