summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/dbevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SecureIM/src/dbevent.cpp')
-rw-r--r--plugins/SecureIM/src/dbevent.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp
new file mode 100644
index 0000000000..9b7d8f10c0
--- /dev/null
+++ b/plugins/SecureIM/src/dbevent.cpp
@@ -0,0 +1,21 @@
+#include "commonheaders.h"
+
+
+void HistoryLog(HANDLE hContact, LPCSTR szText) {
+
+ DBEVENTINFO dbei;
+ memset(&dbei, 0, sizeof(dbei));
+
+ dbei.cbSize = sizeof(dbei);
+ dbei.szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ 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, (WPARAM)0, (LPARAM)&dbei);
+}
+
+
+// EOF