diff options
author | aunsane <aunsane@gmail.com> | 2018-03-22 01:53:49 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-03-22 01:54:09 +0300 |
commit | 2a498d86625f65f6ab308fa20c421099c785bf94 (patch) | |
tree | 9c0d59f41411e46288f88ccdbde4a0d23f440720 /plugins/MirLua/src/m_message.cpp | |
parent | 46cded99bbfb90bea8e998e9183c20cc3e4f7365 (diff) |
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
Diffstat (limited to 'plugins/MirLua/src/m_message.cpp')
-rw-r--r-- | plugins/MirLua/src/m_message.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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);
|