From a8efc9ea6ef69a15d6fdcddfdb6e70c8ef641050 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 2 Jan 2016 16:33:35 +0000 Subject: MirLua: added CallService to m_protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@15995 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_protocols.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/MirLua/src/m_protocols.cpp') diff --git a/plugins/MirLua/src/m_protocols.cpp b/plugins/MirLua/src/m_protocols.cpp index f17d598b8d..0a687fe14a 100644 --- a/plugins/MirLua/src/m_protocols.cpp +++ b/plugins/MirLua/src/m_protocols.cpp @@ -57,6 +57,19 @@ static int lua_Protocols(lua_State *L) return 1; } +static int lua_CallService(lua_State *L) +{ + const char *module = luaL_checkstring(L, 1); + const char *service = luaL_checkstring(L, 2); + WPARAM wParam = luaM_towparam(L, 3); + LPARAM lParam = luaM_tolparam(L, 4); + + INT_PTR res = CallProtoService(module, service, wParam, lParam); + lua_pushinteger(L, res); + + return 1; +} + /***********************************************/ static int lua_GetAccount(lua_State *L) @@ -132,6 +145,7 @@ static luaL_Reg protocolsApi[] = { "AllProtos", lua_Protocols }, { "AllProtocols", lua_Protocols }, { "Protocols", lua_Protocols }, + { "CallService", lua_CallService }, { "GetAccount", lua_GetAccount }, { "AllAccounts", lua_Accounts }, -- cgit v1.2.3