diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-21 20:25:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-21 20:25:26 +0000 |
commit | 365b792d3509d4e94cdc31ee4384bf458f152e59 (patch) | |
tree | 88c3290821f02ea1c0e4926013f353a55278420e /src | |
parent | 4899e62259afc42e8b449a68f2f99bba74e8b025 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdautoaway/autoaway.cpp | 8 |
1 files 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
|