summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index dee7e1547f..3262eace0a 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -182,7 +182,15 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
return;
}
- if (strstr(reply->pData, "service_msg_warning")) {
+ char *pMsgWarning = strstr(reply->pData, "service_msg_warning");
+ if (pMsgWarning) {
+ char *p1 = strchr(pMsgWarning, '>');
+ char *p2 = strchr(pMsgWarning, '<');
+ if (p1 && p2 && (p1 + 1 < p2)) {
+ CMStringA szMsg(p1 + 1, (int)(p2 - p1 - 1));
+ MsgPopup(NULL, ptrW(mir_utf8decodeW(szMsg)), TranslateT("Service message"), true);
+ debugLogA("CVkProto::OnOAuthAuthorize %s", szMsg);
+ }
ConnectionFailed(LOGINERR_WRONGPASSWORD);
return;
}