summaryrefslogtreecommitdiff
path: root/plugins/Ping/src/pingthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Ping/src/pingthread.cpp')
-rw-r--r--plugins/Ping/src/pingthread.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index 1cc8632675..0b21f6aac7 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -58,12 +58,8 @@ void set_list_changed(bool f)
void SetProtoStatus(wchar_t *pszLabel, char *pszProto, int if_status, int new_status)
{
if (mir_strcmp(pszProto, Translate("<all>")) == 0) {
- int num_protocols;
- PROTOACCOUNT **pppDesc;
-
- Proto_EnumAccounts(&num_protocols, &pppDesc);
- for (int i = 0; i < num_protocols; i++)
- SetProtoStatus(pszLabel, pppDesc[i]->szModuleName, if_status, new_status);
+ for (auto &pa : Accounts())
+ SetProtoStatus(pszLabel, pa->szModuleName, if_status, new_status);
}
else {
if (ProtoServiceExists(pszProto, PS_GETSTATUS)) {