summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-10-03 19:13:19 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-10-03 19:13:19 +0300
commit20760db2aec15c20b4fd8a9db7f4112f8c0cf6ce (patch)
treefaa20216d279a345913fea72ab59ad65e5e2abd7
parent3659d753293c8c13ad396a925efa7577fe3796c5 (diff)
some debug code for #1608
-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;
}