summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/dbevent.cpp
blob: 6f5f1bc80bafef32f5b4248eacddc14c5af5a531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "commonheaders.h"


void HistoryLog(HANDLE hContact, LPCSTR szText) {

	DBEVENTINFO dbei;
	memset(&dbei, 0, sizeof(dbei));

	dbei.cbSize = sizeof(dbei);
	dbei.szModule = GetContactProto(hContact);
	dbei.flags = DBEF_SENT|DBEF_READ;
	dbei.timestamp = time(NULL);
	dbei.eventType = EVENTTYPE_MESSAGE;
	dbei.cbBlob = (int)strlen(szText) + 1;
	dbei.pBlob = (PBYTE)szText;

	CallService(MS_DB_EVENT_ADD, 0, (LPARAM)&dbei);
}


// EOF