From f8b41d51f1b760a433c2dbf997ed852b7dd94945 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 3 Jan 2016 21:30:23 +0000 Subject: MirLua: fixed script loading git-svn-id: http://svn.miranda-ng.org/main/trunk@16014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_script_loader.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'plugins/MirLua/src/mlua_script_loader.cpp') diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index b374007dce..13dc5bea99 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -13,20 +13,14 @@ void CLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file) CMLuaScript *script = new CMLuaScript(L, path); g_mLua->Scripts.insert(script); - TCHAR buf[4096]; if (db_get_b(NULL, MODULE, _T2A(file), 1) == FALSE) { - - mir_sntprintf(buf, _T("%s:PASS"), path); - CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)buf); + Log(_T("%s:PASS"), path); return; } if (script->Load()) - { - mir_sntprintf(buf, _T("%s:OK"), path); - CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)buf); - } + Log(_T("%s:OK"), path); } void CLuaScriptLoader::LoadScripts() @@ -34,9 +28,7 @@ void CLuaScriptLoader::LoadScripts() TCHAR scriptDir[MAX_PATH]; FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT)); - TCHAR buf[4096]; - mir_sntprintf(buf, _T("Loading scripts from %s"), scriptDir); - CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)buf); + Log(_T("Loading scripts from %s"), scriptDir); TCHAR searchMask[MAX_PATH]; mir_sntprintf(searchMask, _T("%s\\%s"), scriptDir, _T("*.lua")); -- cgit v1.2.3