diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
commit | eccbb5307a048e70ac4adb0d3fd333be28245fa8 (patch) | |
tree | a9a2c92c13391a5cf288c9e0d841833c54f3cd5e /plugins/RecentContacts | |
parent | 6a9e3738066370dac38f5f6768b8a6f61fe709e0 (diff) |
massive cleanup of useless cbSize fields
Diffstat (limited to 'plugins/RecentContacts')
-rw-r--r-- | plugins/RecentContacts/src/RecentContacts.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index d2570e7a55..4148295222 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -483,17 +483,16 @@ BOOL SaveLastUsedTimeStamp(MCONTACT hContact) int OnMsgEvent(WPARAM, LPARAM lParam)
{
MessageWindowEventData *ed = (MessageWindowEventData *)lParam;
- if (ed->hContact == NULL)
- return 0;
-
- if (ed->uType == MSG_WINDOW_EVT_OPEN)
+ if (ed->hContact != 0 && ed->uType == MSG_WINDOW_EVT_OPEN)
SaveLastUsedTimeStamp(ed->hContact);
- else if (ed->uType == MSG_WINDOW_EVT_CUSTOM) {
- struct TABSRMM_SessionInfo *si = (struct TABSRMM_SessionInfo*) ed->local;
- if (si != NULL)
- if (si->evtCode == tabMSG_WINDOW_EVT_CUSTOM_BEFORESEND)
- SaveLastUsedTimeStamp(ed->hContact);
- }
+ return 0;
+}
+
+int OnProtoBroadcast(WPARAM, LPARAM lParam)
+{
+ ACKDATA *ack = (ACKDATA*)lParam;
+ if (ack->type == ACKTYPE_MESSAGE && ack->result == ACKRESULT_SUCCESS)
+ SaveLastUsedTimeStamp(ack->hContact);
return 0;
}
@@ -555,6 +554,7 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_MSG_WINDOWEVENT, OnMsgEvent);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged );
HookEvent(ME_OPT_INITIALISE, onOptInitialise);
+ HookEvent(ME_PROTO_ACK, OnProtoBroadcast);
return 0;
}
|