summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-06-16 16:51:37 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-06-16 16:51:37 +0000
commiteb774f8437753724bda816f0d274b7639a6706d0 (patch)
tree717b4d31e8582a49aed1cf9e06569f5eb68d4cb1 /plugins/MirLua/src
parent3e9bfc4ac3dd4ff9efd01e9c492b1c0ad0c1a67f (diff)
MirLua: fixed protocol search by contact
git-svn-id: http://svn.miranda-ng.org/main/trunk@16994 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/m_protocols.cpp9
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