summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r--plugins/MirLua/src/mlua.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp
index dc0699182e..1dc4ef440d 100644
--- a/plugins/MirLua/src/mlua.cpp
+++ b/plugins/MirLua/src/mlua.cpp
@@ -10,6 +10,8 @@ static int CompareScripts(const CMLuaScript* p1, const CMLuaScript* p2)
CMLua::CMLua() : L(NULL), Scripts(10, CompareScripts)
{
+ MUUID muidLast = MIID_LAST;
+ hLangpack = GetPluginLangId(muidLast, 0);
}
CMLua::~CMLua()
@@ -17,6 +19,11 @@ CMLua::~CMLua()
Unload();
}
+const int CMLua::GetHLangpack() const
+{
+ return hLangpack;
+}
+
void CMLua::SetPaths()
{
TCHAR path[MAX_PATH];
@@ -53,9 +60,6 @@ void CMLua::Load()
lua_atpanic(L, luaM_atpanic);
- MUUID muidLast = MIID_LAST;
- hScriptsLangpack = GetPluginLangId(muidLast, 0);
-
Log("Loading miranda modules");
CLuaModuleLoader::Load(L);
CLuaScriptLoader::Load(L);
@@ -77,10 +81,10 @@ void CMLua::Unload()
::KillModuleMBButtons();
::KillModuleTTBButton();
- ::KillModuleIcons(hScriptsLangpack);
- ::KillModuleSounds(hScriptsLangpack);
- ::KillModuleMenus(hScriptsLangpack);
- ::KillModuleHotkeys(hScriptsLangpack);
+ ::KillModuleIcons(hLangpack);
+ ::KillModuleSounds(hLangpack);
+ ::KillModuleMenus(hLangpack);
+ ::KillModuleHotkeys(hLangpack);
::KillObjectEventHooks(L);
::KillObjectServices(L);