summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod/src/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StopSpamMod/src/utilities.cpp')
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index be3667ed3a..b001fa98db 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -305,12 +305,9 @@ void __cdecl CleanProtocolExclThread(void *param)
void __cdecl CleanThread(void*)
{
std::list<std::string> protocols;
- int count = 0;
- PROTOACCOUNT **accounts;
- Proto_EnumAccounts(&count, &accounts);
- for (int i = 0; i < count; i++)
- if (!strstr(accounts[i]->szModuleName, "MetaContacts") && !strstr(accounts[i]->szModuleName, "Weather")) //not real protocols
- protocols.push_back(accounts[i]->szModuleName);
+ for (auto &pa : Accounts())
+ if (!strstr(pa->szModuleName, "MetaContacts") && !strstr(pa->szModuleName, "Weather")) //not real protocols
+ protocols.push_back(pa->szModuleName);
std::list<std::string>::iterator end = protocols.end();
for (std::list<std::string>::iterator i = protocols.begin(); i != end; ++i) {