From 46a53191c1ad11a41c948594e972568e62d155b4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Jun 2012 13:58:20 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/useronline/useronline.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/useronline') diff --git a/src/modules/useronline/useronline.cpp b/src/modules/useronline/useronline.cpp index 8c6bf49eb5..543b0c4e95 100644 --- a/src/modules/useronline/useronline.cpp +++ b/src/modules/useronline/useronline.cpp @@ -29,13 +29,13 @@ static int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; int newStatus,oldStatus; - if((HANDLE)wParam==NULL || strcmp(cws->szSetting,"Status")) return 0; + if ((HANDLE)wParam==NULL || strcmp(cws->szSetting,"Status")) return 0; newStatus=cws->value.wVal; oldStatus=DBGetContactSettingWord((HANDLE)wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE); DBWriteContactSettingWord((HANDLE)wParam,"UserOnline","OldStatus",(WORD)newStatus); - if(CallService(MS_IGNORE_ISIGNORED,wParam,IGNOREEVENT_USERONLINE)) return 0; - if(DBGetContactSettingByte((HANDLE)wParam,"CList","Hidden",0)) return 0; - if(newStatus==ID_STATUS_OFFLINE&&oldStatus!=ID_STATUS_OFFLINE) { + if (CallService(MS_IGNORE_ISIGNORED,wParam,IGNOREEVENT_USERONLINE)) return 0; + if (DBGetContactSettingByte((HANDLE)wParam,"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)DBGetContactSettingDword((HANDLE)wParam,"UserOnline","LastEvent",0); @@ -44,7 +44,7 @@ static int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) DBWriteContactSettingDword((HANDLE)wParam,"UserOnline", "LastEvent", 0); } } - if((newStatus==ID_STATUS_ONLINE || newStatus==ID_STATUS_FREECHAT) && + if ((newStatus==ID_STATUS_ONLINE || newStatus==ID_STATUS_FREECHAT) && oldStatus!=ID_STATUS_ONLINE && oldStatus!=ID_STATUS_FREECHAT) { { DWORD ticked = db_dword_get(NULL, "UserOnline", cws->szModule, GetTickCount()); -- cgit v1.2.3