summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
commit3d30ed65f9e226b7b183b23ce5dba435ec491f0b (patch)
tree512db95fca97a5b6f028ed4ca05f473cbd11190c /plugins/NewAwaySysMod/src/MsgEventAdded.cpp
parentb58bd0a705dba9a32e4db1420e2d615c6ee6bd41 (diff)
DBEVENTINFO::timestamp to become 64-bit integer
Diffstat (limited to 'plugins/NewAwaySysMod/src/MsgEventAdded.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index 8262b848bc..11809f5d3c 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -70,7 +70,7 @@ void __cdecl AutoreplyDelayThread(CAutoreplyData *ad)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = szProto;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = ReplyLen;
dbei.pBlob = pszReply;
db_event_add(ad->hContact, &dbei);
@@ -112,7 +112,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
if (dbei->flags & DBEF_SENT || (dbei->eventType != EVENTTYPE_MESSAGE && dbei->eventType != EVENTTYPE_FILE))
return 0;
- if (time(0) - dbei->timestamp > MAX_REPLY_TIMEDIFF) // don't reply to offline messages
+ if (time(0) - dbei->getUnixtime() > MAX_REPLY_TIMEDIFF) // don't reply to offline messages
return 0;
char *szProto = Proto_GetBaseAccountName(hContact);
@@ -139,7 +139,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
// we compare only event timestamps, and do not look at the message itself. it's unlikely that there'll be two events from a contact at the same second, so it's a trade-off between speed and reliability
for (i = MetacontactEvents.GetSize() - 1; i >= 0; i--) {
- if (MetacontactEvents[i].timestamp == dbei->timestamp && MetacontactEvents[i].hMetaContact == hMetaContact) {
+ if (MetacontactEvents[i].timestamp == dbei->getUnixtime() && MetacontactEvents[i].hMetaContact == hMetaContact) {
bMsgWindowIsOpen = MetacontactEvents[i].bMsgWindowIsOpen;
break;
}
@@ -159,7 +159,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
MetacontactEvents.RemoveElem(i);
// add the new event and wait for a subcontact's event
- MetacontactEvents.AddElem(CMetacontactEvent(hContact, dbei->timestamp, IsSRMsgWindowOpen(hContact)));
+ MetacontactEvents.AddElem(CMetacontactEvent(hContact, dbei->getUnixtime(), IsSRMsgWindowOpen(hContact)));
return 0;
}