diff options
-rw-r--r-- | plugins/FingerprintNG/iconpacks/res/Others/Discord.ico | bin | 0 -> 4150 bytes | |||
-rw-r--r-- | plugins/FingerprintNG/iconpacks/res/fp_icons.rc | 1 | ||||
-rw-r--r-- | plugins/FingerprintNG/src/masks.cpp | 2 | ||||
-rw-r--r-- | plugins/FingerprintNG/src/resource.h | 1 | ||||
-rw-r--r-- | protocols/Discord/src/guilds.cpp | 12 |
5 files changed, 16 insertions, 0 deletions
diff --git a/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico b/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico Binary files differnew file mode 100644 index 0000000000..c2830ed132 --- /dev/null +++ b/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico diff --git a/plugins/FingerprintNG/iconpacks/res/fp_icons.rc b/plugins/FingerprintNG/iconpacks/res/fp_icons.rc index cae7839cc9..98b7e8f89f 100644 --- a/plugins/FingerprintNG/iconpacks/res/fp_icons.rc +++ b/plugins/FingerprintNG/iconpacks/res/fp_icons.rc @@ -473,6 +473,7 @@ IDI_VK_KATE ICON "VKontakte\\kate.ico" IDI_VK_MESSENGER ICON "VKontakte\\vkmessenger.ico"
IDI_VK_PHOENIX_FULL ICON "VKontakte\\phoenix_full.ico"
IDI_VK_PHOENIX_LITE ICON "VKontakte\\phoenix_lite.ico"
+IDI_DISCORD ICON "others\\Discord.ico"
IDI_SKYPE ICON "others\\Skype.ico"
IDI_TWITTER ICON "others\\Twitter.ico"
IDI_HANGOUTS ICON "others\\Google+ Hangouts.ico"
diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp index bfe5dfedc9..8ea391e5d7 100644 --- a/plugins/FingerprintNG/src/masks.cpp +++ b/plugins/FingerprintNG/src/masks.cpp @@ -542,6 +542,8 @@ static KN_FP_MASK def_kn_fp_mask[] = { "client_Steam", L"*Steam*", L"Steam", IDI_STEAM, OTHER_PROTOS_CASE },
+ { "client_Discord", L"*Discord*", L"Discord", IDI_DISCORD, OTHER_PROTOS_CASE },
+
/////////////////////////////////////////////////////////////////////////////////////////
// UNDEFINED CLIENTS
diff --git a/plugins/FingerprintNG/src/resource.h b/plugins/FingerprintNG/src/resource.h index 6158722026..12a7001568 100644 --- a/plugins/FingerprintNG/src/resource.h +++ b/plugins/FingerprintNG/src/resource.h @@ -498,6 +498,7 @@ #define IDI_TWITTER 9003
#define IDI_HANGOUTS 9005
#define IDI_VK 9006
+#define IDI_DISCORD 9007
#define IDI_STEAM 9008
#define IDI_VK_KATE 9009
#define IDI_VK_MESSENGER 9010
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp index d19615ef93..0972518154 100644 --- a/protocols/Discord/src/guilds.cpp +++ b/protocols/Discord/src/guilds.cpp @@ -29,6 +29,18 @@ void CDiscordProto::ProcessPresence(const JSONNode &root) return;
}
+ CMStringA szVer("Discord");
+ for (auto &it : root["client_status"]) {
+ if (!mir_strcmp(it.name(), "web"))
+ szVer += " (website)";
+ else if (!mir_strcmp(it.name(), "mobile"))
+ szVer += " (mobile)";
+ }
+ if (szVer.GetLength() > 7)
+ setString(pUser->hContact, "MirVer", szVer);
+ else
+ delSetting(pUser->hContact, "MirVer");
+
setWord(pUser->hContact, "Status", StrToStatus(root["status"].as_mstring()));
CheckAvatarChange(pUser->hContact, root["user"]["avatar"].as_mstring());
|