summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
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