summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_misc.cpp
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-19 21:00:49 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-19 21:00:49 +0000
commit38a93d167307c8d1912abeaf32182abe97a03598 (patch)
tree2602113bb73b15a4cd1a272a2d8464d60141c844 /protocols/MSN/src/msn_misc.cpp
parent05463e65c1fa74da551b9acf701366e185e516fc (diff)
Fixed some memleaks.
Added contact list exchange feature. git-svn-id: http://svn.miranda-ng.org/main/trunk@13704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_misc.cpp')
-rw-r--r--protocols/MSN/src/msn_misc.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index ac44a8998b..1c877b2488 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -32,8 +32,8 @@ const char* CMsnProto::MirandaStatusToMSN(int status)
{
switch (status) {
case ID_STATUS_OFFLINE: return "FLN";
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
+ case ID_STATUS_ONTHEPHONE: return "PHN";
+ case ID_STATUS_OUTTOLUNCH: return "LUN";
case ID_STATUS_NA:
case ID_STATUS_AWAY: return "AWY";
case ID_STATUS_DND:
@@ -49,8 +49,8 @@ WORD CMsnProto::MSNStatusToMiranda(const char *status)
switch ((*(PDWORD)status & 0x00FFFFFF) | 0x20000000) {
case ' LDI': return ID_STATUS_IDLE;
case ' NLN': return ID_STATUS_ONLINE;
- case ' NHP':
- case ' NUL':
+ case ' NHP': return ID_STATUS_ONTHEPHONE;
+ case ' NUL': return ID_STATUS_OUTTOLUNCH;
case ' BRB':
case ' YWA': return ID_STATUS_AWAY;
case ' YSB': return ID_STATUS_OCCUPIED;
@@ -486,12 +486,14 @@ int ThreadData::sendMessage(int msgType, const char* email, int netId, const cha
buf.AppendFormat(
"Messaging: 2.0\r\n"
"Client-Message-ID: %llu\r\n"
- "Message-Type: Text\r\n"
+ "Message-Type: %s\r\n"
"IM-Display-Name: %s\r\n"
- "Content-Type: Text/plain; charset=UTF-8\r\n"
+ "Content-Type: %s\r\n"
"Content-Length: %d\r\n\r\n%s",
msgid,
+ (parFlags & MSG_CONTACT)?"RichText/Contacts":"Text",
pszNick,
+ (parFlags & MSG_CONTACT)?"application/user+xml\r\nSkype-Age: 18":"Text/plain; charset=UTF-8",
strlen(parMsg), parMsg);
if (pszNick!=proto->MyOptions.szEmail) db_free(&dbv);