summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_protocols.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-01-02 16:33:35 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-01-02 16:33:35 +0000
commita8efc9ea6ef69a15d6fdcddfdb6e70c8ef641050 (patch)
tree587fb73bc70603e234b331416767b463182f866b /plugins/MirLua/src/m_protocols.cpp
parenta2aebf5ed9356abdbd341bf112f2c4b0933fbe3c (diff)
MirLua: added CallService to m_protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@15995 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_protocols.cpp')
-rw-r--r--plugins/MirLua/src/m_protocols.cpp14
1 files changed, 14 insertions, 0 deletions
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 },