diff options
Diffstat (limited to 'plugins/MessageState/src/messagestate.cpp')
-rw-r--r-- | plugins/MessageState/src/messagestate.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp index 8f8d450730..3595553ee1 100644 --- a/plugins/MessageState/src/messagestate.cpp +++ b/plugins/MessageState/src/messagestate.cpp @@ -1,5 +1,7 @@ #include "stdafx.h"
+HANDLE hDummyService;
+
LONGLONG GetLastSentMessageTime(MCONTACT hContact)
{
for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent))
@@ -87,7 +89,7 @@ int IconsUpdate(WPARAM hContact, LONGLONG readtime) return 0;
}
-int OnProtoAck(WPARAM wParam, LPARAM lParam)
+int OnProtoAck(WPARAM, LPARAM lParam)
{
ACKDATA *pAck = (ACKDATA *)lParam;
if (pAck && pAck->type == ACKTYPE_MESSAGE && CheckProtoSupport(GetContactProto(pAck->hContact)))
@@ -140,12 +142,23 @@ int OnSrmmWindowEvent(WPARAM, LPARAM lParam) return 0;
}
+INT_PTR DummyService(WPARAM, LPARAM){ return 0; }
+
+void UnInitModule()
+{
+ if (hDummyService)
+ DestroyServiceFunction(hDummyService);
+}
+
int OnModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_MSG_WINDOWEVENT, OnSrmmWindowEvent);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_PROTO_ACK, OnProtoAck);
HookEvent(ME_DB_EVENT_FILTER_ADD, OnEventFilterAdd);
+
+ hDummyService = CreateServiceFunction(MODULENAME "/DummyService", DummyService);
+
// IcoLib support
for (size_t i = 0; i < SIZEOF(Icons); i++)
Icon_Register(g_hInst, MODULENAME, &Icons[i], 1);
|