summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_script_loader.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-23 09:26:59 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-23 09:26:59 +0000
commit34c0b8e8dba1e82842f61eb4ccc2b9ab2696695a (patch)
tree8fbfdaa23adc6af73b04b2bdd5103b568a05a09a /plugins/MirLua/src/mlua_script_loader.cpp
parent4a73d25004e811c187115dc95236553c704fe76b (diff)
MirLua: console should not terminate miranda process
git-svn-id: http://svn.miranda-ng.org/main/trunk@14347 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_script_loader.cpp')
-rw-r--r--plugins/MirLua/src/mlua_script_loader.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp
index dc64e2215a..abeb18d8d4 100644
--- a/plugins/MirLua/src/mlua_script_loader.cpp
+++ b/plugins/MirLua/src/mlua_script_loader.cpp
@@ -1,8 +1,7 @@
#include "stdafx.h"
-CLuaScriptLoader::CLuaScriptLoader(lua_State *L) : L(L)
+CLuaScriptLoader::CLuaScriptLoader(lua_State *L, HANDLE hLogger) : L(L), hLogger(hLogger)
{
- hLogger = mir_createLog(MODULE, _T("MirLua script loader log"), VARST(_T("%miranda_logpath%\\MirLua.txt")), 0);
}
void CLuaScriptLoader::RegisterScriptsFolder(const char *path)
@@ -53,10 +52,10 @@ void CLuaScriptLoader::LoadScripts(const TCHAR *scriptDir)
}
}
-void CLuaScriptLoader::Load(lua_State *L)
+void CLuaScriptLoader::Load(lua_State *L, HANDLE hLogger)
{
TCHAR scriptDir[MAX_PATH];
- CLuaScriptLoader loader(L);
+ CLuaScriptLoader loader(L, hLogger);
FoldersGetCustomPathT(g_hCommonFolderPath, scriptDir, _countof(scriptDir), VARST(COMMON_SCRIPTS_PATHT));
loader.LoadScripts(scriptDir);