diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
commit | 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch) | |
tree | 59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/MirLua/src/Modules | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/MirLua/src/Modules')
-rw-r--r-- | plugins/MirLua/src/Modules/m_message.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/Modules/m_protocols.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/MirLua/src/Modules/m_message.cpp b/plugins/MirLua/src/Modules/m_message.cpp index b1e562b5dc..5c847d5194 100644 --- a/plugins/MirLua/src/Modules/m_message.cpp +++ b/plugins/MirLua/src/Modules/m_message.cpp @@ -26,7 +26,7 @@ static int message_Send(lua_State *L) INT_PTR res = 1; - const char *szProto = GetContactProto(hContact); + const char *szProto = Proto_GetBaseAccountName(hContact); if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) { ptrW wszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID")); ptrW wszMessage(mir_utf8decodeW(message)); diff --git a/plugins/MirLua/src/Modules/m_protocols.cpp b/plugins/MirLua/src/Modules/m_protocols.cpp index d574f0679d..a34f262780 100644 --- a/plugins/MirLua/src/Modules/m_protocols.cpp +++ b/plugins/MirLua/src/Modules/m_protocols.cpp @@ -12,7 +12,7 @@ static int lua_GetProtocol(lua_State *L) switch (lua_type(L, 1)) {
case LUA_TNUMBER:
{
- const char *szModule = GetContactProto(lua_tonumber(L, 1));
+ const char *szModule = Proto_GetBaseAccountName(lua_tonumber(L, 1));
PROTOACCOUNT *pa = Proto_GetAccount(szModule);
if (pa)
szProto = pa->szProtoName;
@@ -115,7 +115,7 @@ static int lua_GetAccount(lua_State *L) switch (lua_type(L, 1)) {
case LUA_TNUMBER:
- name = GetContactProto(lua_tonumber(L, 1));
+ name = Proto_GetBaseAccountName(lua_tonumber(L, 1));
break;
case LUA_TSTRING:
name = lua_tostring(L, 1);
@@ -194,7 +194,7 @@ static int lua_CallService(lua_State *L) switch (lua_type(L, 1)) {
case LUA_TNUMBER:
- szModule = GetContactProto(lua_tonumber(L, 1));
+ szModule = Proto_GetBaseAccountName(lua_tonumber(L, 1));
break;
case LUA_TSTRING:
szModule = lua_tostring(L, 1);
|