summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_commands.cpp
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 17:49:05 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 17:49:05 +0000
commitf9475db573dcf34f9b8ea8180b69c834978f6ac9 (patch)
tree6c79c2d3a7572f65fd80e0c46c3c9973944873be /protocols/MSN/src/msn_commands.cpp
parentc7577005f0d52def37928a96b66b72755e559a97 (diff)
Fixed web authentication method without SkyLib.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13592 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_commands.cpp')
-rw-r--r--protocols/MSN/src/msn_commands.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 3c45f5d98d..6b9d3e3b2d 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -1367,24 +1367,34 @@ LBL_InvalidCommand:
if (GetMyNetID()!=NETID_SKYPE) {
/* MSN account login */
- char *pszSite = "";
switch (MSN_AuthOAuth())
{
- case 1: break;
- case 2: pszSite = "<ssl-site-name>chatservice.live.com</ssl-site-name>"; break;
+ case 1:
+ info->sendPacketPayload("ATH", "CON\\USER",
+ "<user><ssl-compact-ticket>t=%s</ssl-compact-ticket>"
+ "<uic>%s</uic>"
+ "<id>%s</id><alias>%s</alias></user>\r\n",
+ authSSLToken ? ptrA(HtmlEncode(authSSLToken)) : "",
+ authUIC,
+ GetMyUsername(NETID_MSN), GetMyUsername(NETID_SKYPE));
+ break;
+
+ case 2:
+ info->sendPacketPayload("ATH", "CON\\USER",
+ "<user><ssl-compact-ticket>%s</ssl-compact-ticket>"
+ "<uic>%s</uic>"
+ "<ssl-site-name>chatservice.live.com</ssl-site-name>"
+ "</user>\r\n",
+ authStrToken ? ptrA(HtmlEncode(authStrToken)) : "",
+ authUIC);
+ break;
+
default:
m_iDesiredStatus = ID_STATUS_OFFLINE;
return 1;
}
- info->sendPacketPayload("ATH", "CON\\USER",
- "<user><ssl-compact-ticket>t=%s</ssl-compact-ticket>"
- "<uic>%s</uic>%s"
- "<id>%s</id><alias>%s</alias></user>\r\n",
- authSSLToken ? ptrA(HtmlEncode(authSSLToken)) : "",
- authUIC, pszSite,
- GetMyUsername(NETID_MSN), GetMyUsername(NETID_SKYPE));
} else {
/* Skype username/pass login */
ezxml_t xmlcnt = ezxml_parse_str(msgBody, strlen(msgBody));