summaryrefslogtreecommitdiffstats
path: root/source/WebAdmin.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-06 14:38:10 +0200
committermadmaxoft <github@xoft.cz>2013-10-06 14:38:10 +0200
commitfe582b69d5fd330aac4e812d3c5337ffcc8d098b (patch)
tree80ea0107c79eeb64e2de02360f0d1a86755030d6 /source/WebAdmin.cpp
parentRemoved the old WebServer library. (diff)
downloadcuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar.gz
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar.bz2
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar.lz
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar.xz
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.tar.zst
cuberite-fe582b69d5fd330aac4e812d3c5337ffcc8d098b.zip
Diffstat (limited to 'source/WebAdmin.cpp')
-rw-r--r--source/WebAdmin.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp
index 44ba38c8d..378a5966c 100644
--- a/source/WebAdmin.cpp
+++ b/source/WebAdmin.cpp
@@ -50,32 +50,11 @@ public:
-cWebAdmin * WebAdmin = NULL;
-
-
-
-
-
cWebAdmin::cWebAdmin(void) :
m_IsInitialized(false),
m_TemplateScript("<webadmin_template>"),
m_IniFile("webadmin.ini")
{
- WebAdmin = this;
- m_Event = new cEvent();
-}
-
-
-
-
-
-cWebAdmin::~cWebAdmin()
-{
-
- WebAdmin = 0;
-
- m_Event->Wait();
- delete m_Event;
}
@@ -221,7 +200,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque
// Try to get the template from the Lua template script
if (ShouldWrapInTemplate)
{
- if (WebAdmin->m_TemplateScript.Call("ShowPage", WebAdmin, &TemplateRequest, cLuaState::Return, Template))
+ if (m_TemplateScript.Call("ShowPage", this, &TemplateRequest, cLuaState::Return, Template))
{
cHTTPResponse Resp;
Resp.SetContentType("text/html");
@@ -326,7 +305,7 @@ sWebAdminPage cWebAdmin::GetPage(const HTTPRequest & a_Request)
AString FoundPlugin;
if (Split.size() > 1)
{
- for (PluginList::iterator itr = WebAdmin->m_Plugins.begin(); itr != WebAdmin->m_Plugins.end(); ++itr)
+ for (PluginList::iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr)
{
if ((*itr)->GetWebTitle() == Split[1])
{