diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
commit | 9613f96e6a6f96ad02a0fc926054132811ae2bb1 (patch) | |
tree | f8fe94a3efe7598a2af926f264d354f7a08fb943 /plugins/UserInfoEx/src/svc_refreshci.cpp | |
parent | 2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff) |
Accounts() : iterator for accounts
Diffstat (limited to 'plugins/UserInfoEx/src/svc_refreshci.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/svc_refreshci.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index b409fb78b6..59b991cfb9 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -725,7 +725,6 @@ public: RemoveAll();
ContinueWithNext();
}
-
};
static CContactUpdater *ContactUpdater = nullptr;
@@ -744,15 +743,11 @@ static CContactUpdater *ContactUpdater = nullptr; **/
static BOOL IsMirandaOnline()
{
- BOOL bIsOnline = FALSE;
- PROTOACCOUNT **pAcc;
- int nAccCount;
- Proto_EnumAccounts(&nAccCount, &pAcc);
-
- for (int i = 0; (i < nAccCount) && !bIsOnline; i++)
- bIsOnline |= (IsProtoAccountEnabled(pAcc[i]) && IsProtoOnline(pAcc[i]->szModuleName));
+ for (auto &pa : Accounts())
+ if (IsProtoAccountEnabled(pa) && IsProtoOnline(pa->szModuleName))
+ return true;
- return bIsOnline;
+ return false;
}
/***********************************************************************************************************
|