diff options
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 6 | ||||
-rw-r--r-- | protocols/MSN/src/msn_mail.cpp | 1 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 1 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 19 |
5 files changed, 6 insertions, 23 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index cddb412fe5..0f3cd8db04 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -244,7 +244,6 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para pre.timestamp = (DWORD)time(NULL);
pre.szMessage = (char *)isr;
pre.lParam = cnt;
- pre.flags = PREF_TCHAR;
ProtoChainRecv(hContact, PSR_CONTACTS, 0, (LPARAM)&pre);
for (cnt=0; cnt<pre.lParam; cnt++) {
mir_free(isr[cnt]->email);
@@ -299,7 +298,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para PROTORECVEVENT pre = { 0 };
pre.szMessage = (char*)msgBody;
- pre.flags = PREF_UTF + (isRtl ? PREF_RTL : 0);
+ pre.flags = (isRtl ? PREF_RTL : 0);
pre.timestamp = (DWORD)time(NULL);
pre.lParam = 0;
ProtoChainRecvMsg(hContact, &pre);
@@ -1067,7 +1066,6 @@ LBL_InvalidCommand: if (!sentMsg) {
PROTORECVEVENT pre = { 0 };
pre.szMessage = (char*)message;
- pre.flags = PREF_UTF;
pre.timestamp = (DWORD)ts;
ProtoChainRecvMsg(hContact, &pre);
}
@@ -1349,7 +1347,7 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email, mir_sntprintf(tComment, SIZEOF(tComment), TranslateT("%I64u bytes"), ft->std.currentFileSize);
PROTORECVFILET pre = { 0 };
- pre.flags = PREF_TCHAR;
+ pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.tszDescription = tComment;
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 03ab085bc5..77d5d9600c 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -117,7 +117,6 @@ void CMsnProto::getOIMs(ezxml_t xmli) PROTORECVEVENT pre = { 0 };
pre.szMessage = mailInfo.decodeMailBody((char*)mailbody);
- pre.flags = PREF_UTF /*+ ((isRtl) ? PREF_RTL : 0)*/;
pre.timestamp = evtm;
ProtoChainRecvMsg(MSN_HContactFromEmail(szEmail), &pre);
mir_free(pre.szMessage);
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 5683bdb389..ff7e203847 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -98,7 +98,6 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const ch int reasonlen = (int)strlen(reason);
PROTORECVEVENT pre = { 0 };
- pre.flags = PREF_UTF;
pre.timestamp = (DWORD)time(NULL);
pre.lParam = sizeof(DWORD) + sizeof(HANDLE) + nicklen + emaillen + 5 + reasonlen;
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index 8d97c5fa79..06f90bb63b 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -1231,7 +1231,7 @@ void CMsnProto::p2p_InitFileTransfer( mir_sntprintf(tComment, SIZEOF(tComment), TranslateT("%I64u bytes"), ft->std.currentFileSize);
PROTORECVFILET pre = { 0 };
- pre.flags = PREF_TCHAR;
+ pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.tszDescription = tComment;
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 3b9a588261..a49e3bca54 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -659,8 +659,7 @@ DWORD_PTR __cdecl CMsnProto::GetCaps(int type, MCONTACT) return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND;
case PFLAGNUM_4:
- return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SUPPORTIDLE | PF4_IMSENDUTF |
- PF4_IMSENDOFFLINE | PF4_NOAUTHDENYREASON;
+ return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SUPPORTIDLE | PF4_IMSENDOFFLINE | PF4_NOAUTHDENYREASON;
case PFLAGNUM_5:
return PF2_ONTHEPHONE;
@@ -824,19 +823,8 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) }
char *msg = (char*)pszSrc;
- if (msg == NULL) return 0;
-
- if (flags & PREF_UNICODE) {
- char* p = strchr(msg, '\0');
- if (p != msg) {
- while (*(++p) == '\0') {}
- msg = mir_utf8encodeW((wchar_t*)p);
- }
- else
- msg = mir_strdup(msg);
- }
- else
- msg = (flags & PREF_UTF) ? mir_strdup(msg) : mir_utf8encode(msg);
+ if (msg == NULL)
+ return 0;
int rtlFlag = (flags & PREF_RTL) ? MSG_RTL : 0;
@@ -911,7 +899,6 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) break;
}
- mir_free(msg);
return seq;
}
|