diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-21 16:11:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-21 16:11:58 +0000 |
commit | 48266e479d1fcf5153b29c612866845990fccad8 (patch) | |
tree | c8cbc908cd3c5f08731e5e8d7eaac6b568007d09 /protocols/Yahoo/src/im.cpp | |
parent | ebdb556f152734035846f120eb8112f88ef91281 (diff) |
war against atavisms continues
- everything that goes to PSS_MESSAGE should be sent as utf8 string;
- thus PREF_UNICODE & PREF_UTF support discontinued, these constants are removed;
- support for PREF_UNICODE & PREF_UTF in protocols also removed;
- PREF_UNICODE used in file transfers (PROTOFILERECVT) replaced with PRFF_UNICODE / PRFF_TCHAR
git-svn-id: http://svn.miranda-ng.org/main/trunk@13734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/im.cpp')
-rw-r--r-- | protocols/Yahoo/src/im.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index 0da62a376a..1301007189 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -105,8 +105,6 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons Set_Protocol(hContact, protocol);
PROTORECVEVENT pre = { 0 };
- pre.flags = (utf8) ? PREF_UTF : 0;
-
if (tm) {
MEVENT hEvent = db_event_last(hContact);
@@ -171,29 +169,21 @@ void __cdecl CYahooProto::im_sendackfail_longmsg(void *hContact) (LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars"));
}
-int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
{
if (!m_bLoggedIn) {/* don't send message if we not connected! */
ForkThread(&CYahooProto::im_sendackfail, (void*)hContact);
return 1;
}
- ptrA msg;
- if (flags & PREF_UNICODE) /* convert to utf8 */
- msg = mir_utf8encodeW((wchar_t*)&pszSrc[mir_strlen(pszSrc) + 1]);
- else if (flags & PREF_UTF)
- msg = mir_strdup(pszSrc);
- else
- msg = mir_utf8encode(pszSrc);
-
- if (mir_strlen(msg) > 800) {
+ if (mir_strlen(pszSrc) > 800) {
ForkThread(&CYahooProto::im_sendackfail_longmsg, (void*)hContact);
return 1;
}
DBVARIANT dbv;
if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), msg, 1);
+ send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), pszSrc, 1);
ForkThread(&CYahooProto::im_sendacksuccess, (void*)hContact);
|