diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-06-16 16:51:37 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-06-16 16:51:37 +0000 |
commit | eb774f8437753724bda816f0d274b7639a6706d0 (patch) | |
tree | 717b4d31e8582a49aed1cf9e06569f5eb68d4cb1 | |
parent | 3e9bfc4ac3dd4ff9efd01e9c492b1c0ad0c1a67f (diff) |
MirLua: fixed protocol search by contact
git-svn-id: http://svn.miranda-ng.org/main/trunk@16994 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/MirLua/src/m_protocols.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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<PROTOACCOUNT>::Set(L, pa);
else
|