summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/svc_refreshci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/svc_refreshci.cpp')
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index ddf2672909..6a99a2ac44 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -629,7 +629,7 @@ class CContactUpdater : public CContactQueue
**/
virtual void Callback(MCONTACT hContact, PVOID param)
{
- LPSTR pszProto = DB::Contact::Proto(hContact);
+ LPSTR pszProto = Proto_GetBaseAccountName(hContact);
if (pszProto && pszProto[0])
{
@@ -689,7 +689,7 @@ public:
**/
BOOL QueueAddRefreshContact(MCONTACT hContact, int iWait)
{
- LPSTR pszProto = DB::Contact::Proto(hContact);
+ LPSTR pszProto = Proto_GetBaseAccountName(hContact);
if ((mir_strcmp(pszProto, "Weather") != 0) && (mir_strcmp(pszProto, META_PROTO) != 0) && IsProtoOnline(pszProto))
return Add(iWait, hContact);
@@ -763,17 +763,14 @@ static CContactUpdater *ContactUpdater = NULL;
**/
static BOOL IsMirandaOnline()
{
- PROTOACCOUNT **pAcc;
- int i, nAccCount;
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));
- if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc)))
- {
- for (i = 0; (i < nAccCount) && !bIsOnline; i++)
- {
- bIsOnline |= (IsProtoAccountEnabled(pAcc[i]) && IsProtoOnline(pAcc[i]->szModuleName));
- }
- }
return bIsOnline;
}