diff options
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index f1b78ad7aa..f29488d1a2 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -455,6 +455,8 @@ bool CVkProto::AutoFillForm(char *pBody, CMStringA &szAction, CMStringA& szResul if (!RunCaptchaForm(getAttr(pCaptchaBeg, "src"), value))
return false;
}
+ else if (name == "code")
+ value = RunConfirmationCode();
if (!result.IsEmpty())
result.AppendChar('&');
@@ -468,6 +470,18 @@ bool CVkProto::AutoFillForm(char *pBody, CMStringA &szAction, CMStringA& szResul return true;
}
+
+CMString CVkProto::RunConfirmationCode()
+{
+ ENTER_STRING pForm = { sizeof(pForm) };
+ pForm.type = ESF_PASSWORD;
+ pForm.caption = TranslateT("Enter confirmation code ");
+ pForm.ptszInitVal = NULL;
+ pForm.szModuleName = m_szModuleName;
+ pForm.szDataPrefix = "confirmcode_";
+ return (!EnterString(&pForm)) ? CMString() : CMString(pForm.ptszResult);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CVkProto::GrabCookies(NETLIBHTTPREQUEST *nhr)
|