summaryrefslogtreecommitdiffstats
path: root/source/cWebPlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cWebPlugin.cpp')
-rw-r--r--source/cWebPlugin.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/cWebPlugin.cpp b/source/cWebPlugin.cpp
new file mode 100644
index 000000000..43e5e5e54
--- /dev/null
+++ b/source/cWebPlugin.cpp
@@ -0,0 +1,22 @@
+#include "cWebPlugin.h"
+#include "cWebAdmin.h"
+#include "cServer.h"
+#include "cMCLogger.h"
+#include "cRoot.h"
+
+#include "MemoryLeak.h"
+
+cWebPlugin::cWebPlugin( lua_State* L )
+{
+ LOG("cWebPlugin::cWebPlugin()");
+ m_LuaState = L;
+ cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin();
+ if( WebAdmin ) WebAdmin->AddPlugin( this );
+}
+
+cWebPlugin::~cWebPlugin()
+{
+ LOG("~cWebPlugin::cWebPlugin()");
+ cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin();
+ if( WebAdmin ) WebAdmin->RemovePlugin( this );
+} \ No newline at end of file