summaryrefslogtreecommitdiff
path: root/plugins/CSList/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CSList/src')
-rw-r--r--plugins/CSList/src/cslist.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index a63999c415..cf4a830c2a 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -93,13 +93,9 @@ static int OnInitOptions(WPARAM wparam, LPARAM)
static int OnCreateMenuItems(WPARAM, LPARAM)
{
- int protoCount;
- PROTOACCOUNT** pdesc;
- Proto_EnumAccounts(&protoCount, &pdesc);
-
- for (int i = 0; i < protoCount; i++)
- if (ProtoServiceExists(pdesc[i]->szModuleName, PS_SETCUSTOMSTATUSEX))
- addProtoStatusMenuItem(pdesc[i]->szModuleName);
+ for (auto &pa : Accounts())
+ if (ProtoServiceExists(pa->szModuleName, PS_SETCUSTOMSTATUSEX))
+ addProtoStatusMenuItem(pa->szModuleName);
return 0;
}