From eb774f8437753724bda816f0d274b7639a6706d0 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 16 Jun 2016 16:51:37 +0000 Subject: MirLua: fixed protocol search by contact git-svn-id: http://svn.miranda-ng.org/main/trunk@16994 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_protocols.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (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 21ac0683a5..b24b610067 100644 --- a/plugins/MirLua/src/m_protocols.cpp +++ b/plugins/MirLua/src/m_protocols.cpp @@ -9,7 +9,12 @@ static int lua_GetProtocol(lua_State *L) switch (lua_type(L, 1)) { case LUA_TNUMBER: - name = GetContactProto(lua_tonumber(L, 1)); + { + const char *proto = GetContactProto(lua_tonumber(L, 1)); + PROTOACCOUNT *pa = Proto_GetAccount(proto); + if (pa) + name = pa->szProtoName; + } break; case LUA_TSTRING: name = lua_tostring(L, 1); @@ -86,7 +91,7 @@ static int lua_GetAccount(lua_State *L) break; } - PROTOACCOUNT* pa = Proto_GetAccount(name); + PROTOACCOUNT *pa = Proto_GetAccount(name); if (pa) MT::Set(L, pa); else -- cgit v1.2.3