summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-18 22:31:44 +0200
committermadmaxoft <github@xoft.cz>2013-09-18 22:31:44 +0200
commit47ef25ce7796eec21be90ad2a2d90d5b6637ac23 (patch)
treea4ed5fc8258e34aa4187f4e4318e122436ea2b68
parentImproved error message in cPlugin:AddWebTab() API. (diff)
downloadcuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar.gz
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar.bz2
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar.lz
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar.xz
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.tar.zst
cuberite-47ef25ce7796eec21be90ad2a2d90d5b6637ac23.zip
Diffstat (limited to '')
-rw-r--r--source/PluginLua.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/PluginLua.cpp b/source/PluginLua.cpp
index 81a536838..03aefb098 100644
--- a/source/PluginLua.cpp
+++ b/source/PluginLua.cpp
@@ -81,6 +81,9 @@ bool cPluginLua::Initialize(void)
lua_setglobal(m_LuaState, LUA_PLUGIN_INSTANCE_VAR_NAME);
lua_pushstring(m_LuaState, GetName().c_str());
lua_setglobal(m_LuaState, LUA_PLUGIN_NAME_VAR_NAME);
+
+ tolua_pushusertype(m_LuaState, this, "cPluginLua");
+ lua_setglobal(m_LuaState, "g_Plugin");
}
std::string PluginPath = FILE_IO_PREFIX + GetLocalDirectory() + "/";