From 365b792d3509d4e94cdc31ee4384bf458f152e59 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Mar 2013 20:25:26 +0000 Subject: we use the idle state only in Online & FFC modes git-svn-id: http://svn.miranda-ng.org/main/trunk@4155 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdautoaway/autoaway.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/stdautoaway/autoaway.cpp b/src/core/stdautoaway/autoaway.cpp index 55cd6289fa..4e5d9e7fd8 100644 --- a/src/core/stdautoaway/autoaway.cpp +++ b/src/core/stdautoaway/autoaway.cpp @@ -82,9 +82,6 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) continue; int currentstatus = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0); - if (currentstatus < ID_STATUS_ONLINE || currentstatus == ID_STATUS_INVISIBLE) - continue; - int statusbits = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); int status = mii.aaStatus; if ( !(statusbits & Proto_Status2Flag(status))) { @@ -93,13 +90,16 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) status = ID_STATUS_AWAY; } if (lParam & IDF_ISIDLE) { + if (currentstatus != ID_STATUS_ONLINE && currentstatus != ID_STATUS_FREECHAT) + continue; + // save old status of account and set to given status db_set_w(NULL, AA_MODULE, pa->szModuleName, currentstatus); Proto_SetStatus(pa->szModuleName, status); } else { int oldstatus = db_get_w(NULL, AA_MODULE, pa->szModuleName, 0); - if (oldstatus < ID_STATUS_ONLINE) + if (oldstatus != ID_STATUS_ONLINE && oldstatus != ID_STATUS_FREECHAT) continue; // returning from idle and this accout was set away, set it back -- cgit v1.2.3