summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-15 18:35:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-15 18:35:28 +0300
commit436e303e24e5046d6cc52ac3da51a0b51adbef36 (patch)
tree4f7d3b27ad24e710dae845558e2d719b54d1d88a /plugins/NewAwaySysMod/src/MsgEventAdded.cpp
parentf0d86d413859d402331b49b98db7d61fef801489 (diff)
simpler way of applying server ids to messages
Diffstat (limited to 'plugins/NewAwaySysMod/src/MsgEventAdded.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index ff4d1c35d4..56749a1d7f 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -64,17 +64,16 @@ void __cdecl AutoreplyDelayThread(CAutoreplyData *ad)
ProtoChainSend(ad->hContact, PSS_MESSAGE, 0, (LPARAM)pszReply);
if (g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_LOGREPLY)) { // store in the history
- DBEVENTINFO dbeo = {};
- dbeo.eventType = EVENTTYPE_MESSAGE;
- dbeo.flags = DBEF_SENT | DBEF_UTF;
- dbeo.szModule = szProto;
- dbeo.timestamp = time(0);
-
- dbeo.cbBlob = ReplyLen;
- dbeo.pBlob = (PBYTE)(char*)pszReply;
-
SleepEx(1000, true); // delay before sending the reply, as we need it to be later than the message we're replying to (without this delay, srmm puts the messages in a wrong order)
- db_event_add(ad->hContact, &dbeo);
+
+ DBEVENTINFO dbei = {};
+ dbei.eventType = EVENTTYPE_MESSAGE;
+ dbei.flags = DBEF_SENT | DBEF_UTF;
+ dbei.szModule = szProto;
+ dbei.timestamp = time(0);
+ dbei.cbBlob = ReplyLen;
+ dbei.pBlob = (PBYTE)(char*)pszReply;
+ db_event_add(ad->hContact, &dbei);
}
delete ad;