summaryrefslogtreecommitdiff
path: root/src/core/stduseronline
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stduseronline')
-rw-r--r--src/core/stduseronline/src/useronline.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index 2a3c16d49f..ab01edd77a 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -84,14 +84,9 @@ static int UserOnlineAck(WPARAM, LPARAM lParam)
static int UserOnlineModulesLoaded(WPARAM, LPARAM)
{
- int numAccounts;
- PROTOACCOUNT** accounts;
- Proto_EnumAccounts(&numAccounts, &accounts);
-
- // reset the counter
- for (int i = 0; i < numAccounts; i++)
- if (accounts[i]->IsEnabled())
- db_set_dw(NULL, "UserOnline", accounts[i]->szModuleName, GetTickCount());
+ for (auto &pa : Accounts())
+ if (pa->IsEnabled())
+ db_set_dw(NULL, "UserOnline", pa->szModuleName, GetTickCount());
return 0;
}