summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-09-05 18:32:39 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-09-05 18:32:39 +0000
commit1815e1619cdcbb3957183ab4b8fc52157d5e9111 (patch)
treecc19c2913b486f37ccc0cb7c60fdfd857a96519a /plugins/MirLua
parentd90a7bfca694e956879221ba24f4b54cd35379f3 (diff)
MirLua: added GetFullPath to m_core
git-svn-id: http://svn.miranda-ng.org/main/trunk@15278 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_core.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp
index 91fe4df070..6a5b4cb2d0 100644
--- a/plugins/MirLua/src/m_core.cpp
+++ b/plugins/MirLua/src/m_core.cpp
@@ -201,6 +201,16 @@ static int lua_ReplaceVariables(lua_State *L)
return 1;
}
+static int lua_GetFullPath(lua_State *L)
+{
+ TCHAR path[MAX_PATH];
+ GetModuleFileName(NULL, path, MAX_PATH);
+
+ lua_pushstring(L, ptrA(mir_utf8encodeT(path)));
+
+ return 1;
+}
+
luaL_Reg coreApi[] =
{
{ "CreateHookableEvent", lua_CreateHookableEvent },
@@ -225,6 +235,8 @@ luaL_Reg coreApi[] =
{ "Translate", lua_Translate },
{ "ReplaceVariables", lua_ReplaceVariables },
+ { "GetFullPath", lua_GetFullPath },
+
{ "NULL", NULL },
{ "INVALID_HANDLE_VALUE", NULL },