summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Import/src/import.cpp10
1 files 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;