diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-07 19:40:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-07 19:40:11 +0300 |
commit | 3aae70e7ad1247f82d14314a6afe9c4b22d0fa2a (patch) | |
tree | 5ce54d69b0d73aa78b66756c8d86f7403acbd619 /protocols/ICQ-WIM | |
parent | b396750fae7f9f41043ddeb849e5cff29cbcca9c (diff) |
MRA account support moved from Dummy to ICQ
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r-- | protocols/ICQ-WIM/src/main.cpp | 9 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/utils.cpp | 7 |
4 files changed, 19 insertions, 1 deletions
diff --git a/protocols/ICQ-WIM/src/main.cpp b/protocols/ICQ-WIM/src/main.cpp index d3175491ac..2a5cd298f2 100644 --- a/protocols/ICQ-WIM/src/main.cpp +++ b/protocols/ICQ-WIM/src/main.cpp @@ -44,6 +44,15 @@ CMPlugin::CMPlugin() : SetUniqueId(DB_KEY_ID); } +struct CMPluginMra : public ACCPROTOPLUGIN<CIcqProto> +{ + CMPluginMra() : ACCPROTOPLUGIN<CIcqProto>("MRA", pluginInfoEx) + { + SetUniqueId(DB_KEY_ID); + } +} +static g_pluginMra; + ///////////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index ba57b37cdc..6e0b3f3989 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -102,6 +102,8 @@ void CIcqProto::OnModulesLoaded() } else { CMStringW wszEmail(getMStringW("Email")); + if (wszEmail.IsEmpty()) + wszEmail = getMStringW("e-mail"); if (!wszEmail.IsEmpty()) m_szOwnId = wszEmail; } diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 8c4fc52b78..1144df6b4b 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -258,7 +258,7 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact) setDword(hContact, "Status", StatusFromString(str)); Json2string(hContact, buddy, "friendly", "Nick"); - Json2string(hContact, buddy, "emailId", "e-mail"); + Json2string(hContact, buddy, "emailId", "Email"); Json2string(hContact, buddy, "cellNumber", "Cellular"); Json2string(hContact, buddy, "phoneNumber", "Phone"); Json2string(hContact, buddy, "workNumber", "CompanyPhone"); diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp index cd5265674f..0e41836901 100644 --- a/protocols/ICQ-WIM/src/utils.cpp +++ b/protocols/ICQ-WIM/src/utils.cpp @@ -35,6 +35,13 @@ void CIcqProto::InitContactCache() _itow(dwUin, buf, 10); setWString(it, DB_KEY_ID, buf); } + else { + CMStringW wszEmail(getMStringW(it, "e-mail")); + if (!wszEmail.IsEmpty()) { + delSetting(it, "UIN"); + setWString(it, DB_KEY_ID, wszEmail); + } + } m_arCache.insert(new IcqCacheItem(GetUserId(it), it)); } |