diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-08-27 08:13:55 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-08-27 08:13:55 +0000 |
commit | 2dce488713913a350803cd188919984b5d9b4f90 (patch) | |
tree | 4879abb0e2e21142340408ac0e88b2b13b406974 /protocols/VKontakte/src/vk_thread.cpp | |
parent | ae5a222a8ce41b920593c2d2a7f3911acc7861f7 (diff) |
VKontakte: show 'service_msg_warning'
git-svn-id: http://svn.miranda-ng.org/main/trunk@17210 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
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;
}
|