diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-22 22:19:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-22 22:19:44 +0300 |
commit | b97a2cf13002dd897e1021f4f5ae30006f87b269 (patch) | |
tree | 008e20f0c52fd0f8332f601345421e05b251bc97 | |
parent | b7a1b2a410469078ee6bc46e959a427258a6f356 (diff) |
fix for import old-style accounts visibility settings
-rw-r--r-- | plugins/Import/src/import.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 76ff58be8e..5faff95ca8 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -459,7 +459,7 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules) bool bImportSysAll = (nImportOptions & IOPT_SYS_SETTINGS) != 0;
for (auto &p : arAccountMap) {
- if (p->pa != nullptr || p->szBaseProto == NULL || !mir_strcmp(p->szSrcAcc, META_PROTO))
+ if (p->szBaseProto == NULL || !mir_strcmp(p->szSrcAcc, META_PROTO))
continue;
if (!Proto_IsProtocolLoaded(p->szBaseProto)) {
@@ -467,15 +467,17 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules) continue;
}
- ACC_CREATE newacc;
- newacc.pszBaseProto = p->szBaseProto;
- newacc.pszInternal = nullptr;
- newacc.ptszAccountName = p->tszSrcName;
-
- p->pa = ProtoCreateAccount(&newacc);
if (p->pa == nullptr) {
- AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto);
- return false;
+ ACC_CREATE newacc;
+ newacc.pszBaseProto = p->szBaseProto;
+ newacc.pszInternal = nullptr;
+ newacc.ptszAccountName = p->tszSrcName;
+
+ p->pa = ProtoCreateAccount(&newacc);
+ if (p->pa == nullptr) {
+ AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto);
+ continue;
+ }
}
char szSetting[100];
|