From 0f371258568d4c1e9515f4a8e9abe53e393717cd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 17 Oct 2014 18:13:59 +0000 Subject: account name added to a search git-svn-id: http://svn.miranda-ng.org/main/trunk@10817 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index e30610416f..adf7609965 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -210,7 +210,7 @@ static bool FindDestAccount(const char *szProto) return false; } -static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto) +static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto, const TCHAR *ptszName) { int destProtoCount; PROTOACCOUNT **destAccs; @@ -231,6 +231,9 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto) if (pa->bOldProto || pa->bIsVirtual || pa->bDynDisabled) return pa; + if (ptszName && !_tcscmp(pa->tszAccountName, ptszName)) + return pa; + char *pszUniqueSetting = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); if (!pszUniqueSetting || INT_PTR(pszUniqueSetting) == CALLSERVICE_NOTFOUND) { pProto = pa; @@ -273,7 +276,10 @@ void ImportAccounts() continue; } - PROTOACCOUNT *pa = FindMyAccount(szProto, szBaseProto); + itoa(800+i, szSetting, 10); + ptrT tszName(myGetWs(NULL, "Protocols", szSetting)); + + PROTOACCOUNT *pa = FindMyAccount(szProto, szBaseProto, tszName); if (pa) { arAccountMap.insert(new AccountMap(szProto, pa->szModuleName)); continue; -- cgit v1.2.3