summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/server.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index b9ce60811e..cb15344580 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -289,9 +289,19 @@ void CDiscordProto::OnReceiveMessageAck(NETLIBHTTPREQUEST *pReply, AsyncHttpRequ
/////////////////////////////////////////////////////////////////////////////////////////
+#define RECAPTCHA_API_KEY "6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn"
+#define RECAPTCHA_SITE_URL "https://discordapp.com"
+
void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*)
{
if (pReply->resultCode != 200) {
+ JSONNode root = JSONNode::parse(pReply->pData);
+ if (root) {
+ const JSONNode &captcha = root["captcha_key"].as_array();
+ if (captcha && captcha.begin()[0].as_mstring() == "captcha-required") {
+ debugLogA("captcha required");
+ }
+ }
ConnectionFailed(LOGINERR_WRONGPASSWORD);
return;
}