summaryrefslogtreecommitdiff
path: root/src/core/stduseronline
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
commit1925d3521846f4e6683d3d537cc41de9c9bd7250 (patch)
tree3f9bd6e5f557dc9eac040b078ededd5ee8e7870d /src/core/stduseronline
parentb63d67c92da0c420ee7c4f81b8ecdd3b8cfd132d (diff)
"we don't need these variables" (c) Pink Floyd
git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stduseronline')
-rw-r--r--src/core/stduseronline/useronline.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/stduseronline/useronline.cpp b/src/core/stduseronline/useronline.cpp
index 1093f380db..2f896fe3af 100644
--- a/src/core/stduseronline/useronline.cpp
+++ b/src/core/stduseronline/useronline.cpp
@@ -31,24 +31,24 @@ static bool Proto_IsAccountEnabled(PROTOACCOUNT* pa)
return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
}
-static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
+static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if ((HANDLE)wParam == NULL || strcmp(cws->szSetting, "Status"))
+ if (hContact == NULL || strcmp(cws->szSetting, "Status"))
return 0;
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w(wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- db_set_w(wParam, "UserOnline", "OldStatus", (WORD)newStatus);
- if (CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE)) return 0;
- if (db_get_b(wParam, "CList", "Hidden", 0)) return 0;
+ int oldStatus = db_get_w(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
+ db_set_w(hContact, "UserOnline", "OldStatus", (WORD)newStatus);
+ if (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE)) return 0;
+ if (db_get_b(hContact, "CList", "Hidden", 0)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
- int lastEvent = (int)db_get_dw(wParam, "UserOnline", "LastEvent", 0);
+ int lastEvent = (int)db_get_dw(hContact, "UserOnline", "LastEvent", 0);
if (lastEvent) {
- CallService(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)lastEvent);
- db_set_dw(wParam, "UserOnline", "LastEvent", 0);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)lastEvent);
+ db_set_dw(hContact, "UserOnline", "LastEvent", 0);
}
}
if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) &&
@@ -63,11 +63,11 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)(uniqueEventId++);
cle.hIcon = LoadSkinIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
- mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName(wParam, 0));
+ mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = tooltip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);