From c6fb861d7159279b6ee4a4dd678d4693ee56bac6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Oct 2012 12:50:40 +0000 Subject: death of old nasty clutch with MS_PROTO_ENUMPROTOCOLS & PROTOACCOUNT::type git-svn-id: http://svn.miranda-ng.org/main/trunk@1799 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/main.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 025ad8ef4d..f16a875b3a 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -91,14 +91,12 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) // Only autorun import wizard if at least one protocol is installed int nProtocols = 0; - PROTOCOLDESCRIPTOR **ppProtos = NULL; - CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&nProtocols, (LPARAM)&ppProtos); - for (int n=0; n < nProtocols; n++) { - if (ppProtos[n]->type == PROTOTYPE_PROTOCOL) { - CallService(IMPORT_SERVICE, 0, 0); - DBWriteContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1); - break; - } } + PROTOACCOUNT **ppProtos = NULL; + ProtoEnumAccounts(&nProtocols, &ppProtos); + if (nProtocols > 0) { + CallService(IMPORT_SERVICE, 0, 0); + DBWriteContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1); + } return 0; } -- cgit v1.2.3