diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-26 15:39:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-26 15:39:47 +0300 |
commit | ab5aebed05900b508d8f4ba9bbc230f119a3ac02 (patch) | |
tree | 64fb081363e09f4894833aa014ea6d476f578bff /plugins/Import | |
parent | e235eb879d869634581a5701af72d28f4b3d404d (diff) |
Import: fix for original internal account name prevention (causes status icons to be mixed up)
- also fixes #1210
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/import.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index a7bf297e11..6a43144059 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -476,7 +476,11 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules) }
if (p->pa == nullptr) {
- p->pa = Proto_CreateAccount(nullptr, p->szBaseProto, p->tszSrcName);
+ char *szNewInternalName = nullptr; // create a new internal name by default
+ if (!Proto_GetAccount(p->szSrcAcc))
+ szNewInternalName = p->szSrcAcc; // but if the original internal name is available, keep it
+
+ p->pa = Proto_CreateAccount(szNewInternalName, p->szBaseProto, p->tszSrcName);
if (p->pa == nullptr) {
AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto);
continue;
|