summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/dbevent.cpp
blob: a5936df19124bb75950cf6d2ce22a52bb2899cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "commonheaders.h"

void HistoryLog(MCONTACT hContact, LPCSTR szText)
{
	DBEVENTINFO dbei = {};
	dbei.szModule = GetContactProto(hContact);
	dbei.flags = DBEF_SENT | DBEF_READ;
	dbei.timestamp = time(nullptr);
	dbei.eventType = EVENTTYPE_MESSAGE;
	dbei.cbBlob = (int)mir_strlen(szText) + 1;
	dbei.pBlob = (PBYTE)szText;
	db_event_add(0, &dbei);
}