From 2a498d86625f65f6ab308fa20c421099c785bf94 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 22 Mar 2018 01:53:49 +0300 Subject: MirLua: various fixes - CMLua now inherit PLUGIN - additional lua fuctions initialization moved to separated loader - ability to realod script without object recreation - scropt object should control own enable state - fix m_json whit is not workes almost at all - version bump --- plugins/MirLua/src/m_message.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/m_message.cpp') diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index c02adb0478..e382616954 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -27,15 +27,13 @@ static int message_Send(lua_State *L) INT_PTR res = 1; const char *szProto = GetContactProto(hContact); - if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) - { + if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) { ptrW wszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID")); ptrW wszMessage(mir_utf8decodeW(message)); res = Chat_SendUserMessage(szProto, wszChatRoom, wszMessage); lua_pushinteger(L, res); } - else if ((res = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED) - { + else if ((res = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED) { DBEVENTINFO dbei = {}; dbei.szModule = MODULE; dbei.timestamp = time(nullptr); -- cgit v1.2.3