summaryrefslogtreecommitdiff
path: root/plugins/QuickContacts/src/quickcontacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/QuickContacts/src/quickcontacts.cpp')
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 3bc7f4f355..2a653dbd21 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -217,18 +217,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
// handle of contact is set as window-userdata
int EventAdded(WPARAM wparam, LPARAM lparam)
{
- DBEVENTINFO dbei;
-
- ZeroMemory(&dbei,sizeof(dbei));
- dbei.cbSize=sizeof(dbei);
- dbei.cbBlob=0;
-
- CallService(MS_DB_EVENT_GET,lparam,(LPARAM)&dbei);
-
- if( !(dbei.flags & DBEF_SENT)
- || dbei.flags & DBEF_READ
- || !DBGetContactSettingByte(NULL, MODULE_NAME, "EnableLastSentTo", 0)
- || DBGetContactSettingWord(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL) != TYPE_GLOBAL)
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get((HANDLE)lparam, &dbei);
+ if ( !(dbei.flags & DBEF_SENT) || (dbei.flags & DBEF_READ)
+ || !DBGetContactSettingByte(NULL, MODULE_NAME, "EnableLastSentTo", 0)
+ || DBGetContactSettingWord(NULL, MODULE_NAME, "MsgTypeRec", TYPE_GLOBAL) != TYPE_GLOBAL)
return 0;
DBWriteContactSettingDword(NULL, MODULE_NAME, "LastSentTo", (DWORD)(HANDLE)wparam);