summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StopSpamPlus')
-rw-r--r--plugins/StopSpamPlus/src/events.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index ae3c4794a6..e6f948f2ef 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -4,15 +4,11 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
{
MEVENT hDbEvent = (MEVENT)lParam;
- DBEVENTINFO dbei = {};
- dbei.cbBlob = db_event_getBlobSize(hDbEvent);
- if (-1 == dbei.cbBlob)
+ DB::EventInfo dbei;
+ dbei.cbBlob = -1;
+ if (db_event_get(hDbEvent, &dbei))
return 0;
- mir_ptr<BYTE> blob((LPBYTE)mir_alloc(dbei.cbBlob));
- dbei.pBlob = blob;
- db_event_get(hDbEvent, &dbei);
-
// if event is in protocol that is not despammed
if (g_sets.ProtoDisabled(dbei.szModule))
return 0;