From 5565e5b9839eea8a57e9c46f87e611dd546c8b46 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Apr 2018 18:44:31 +0300 Subject: status caching moved from MenuItem to PROTOACCOUNT - this is very effective --- plugins/SeenPlugin/src/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 363da08e53..3a0a2065e8 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -683,10 +683,10 @@ int ModeChange(WPARAM, LPARAM lparam) DBWriteTimeTS(time(nullptr), NULL); - // isetting=CallProtoService(ack->szModule,PS_GETSTATUS,0,0); WORD isetting = (WORD)ack->lParam; - if (isetting < ID_STATUS_OFFLINE) isetting = ID_STATUS_OFFLINE; - if ((isetting > ID_STATUS_OFFLINE) && ((WORD)ack->hProcess <= ID_STATUS_OFFLINE)) { + if (isetting < ID_STATUS_OFFLINE) + isetting = ID_STATUS_OFFLINE; + if ((isetting > ID_STATUS_OFFLINE) && ((UINT_PTR)ack->hProcess <= ID_STATUS_OFFLINE)) { //we have just loged-in db_set_dw(NULL, "UserOnline", ack->szModule, GetTickCount()); if (!Miranda_IsTerminated() && IsWatchedProtocol(ack->szModule)) { @@ -698,7 +698,7 @@ int ModeChange(WPARAM, LPARAM lparam) mir_forkthread(cleanThread, info); } } - else if ((isetting == ID_STATUS_OFFLINE) && ((WORD)ack->hProcess > ID_STATUS_OFFLINE)) { + else if ((isetting == ID_STATUS_OFFLINE) && ((UINT_PTR)ack->hProcess > ID_STATUS_OFFLINE)) { //we have just loged-off if (IsWatchedProtocol(ack->szModule)) { char str[MAXMODULELABELLENGTH + 9]; -- cgit v1.2.3