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/Twitter | |
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/Twitter')
-rw-r--r-- | protocols/Twitter/src/connection.cpp | 1 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 12 |
2 files changed, 2 insertions, 11 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index f40a6294f3..f793b09e0a 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -628,7 +628,6 @@ void TwitterProto::UpdateMessages(bool pre_read) MCONTACT hContact = AddToClientList(i->username.c_str(), "");
PROTORECVEVENT recv = { 0 };
- recv.flags = PREF_UTF;
if (pre_read)
recv.flags |= PREF_CREATEREAD;
recv.szMessage = const_cast<char*>(i->status.text.c_str());
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 820c67d1e2..dd28a80e25 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -86,7 +86,7 @@ DWORD_PTR TwitterProto::GetCaps(int type, MCONTACT) case PFLAGNUM_3:
return PF2_ONLINE;
case PFLAGNUM_4:
- return PF4_NOCUSTOMAUTH | PF4_IMSENDUTF | PF4_AVATARS;
+ return PF4_NOCUSTOMAUTH | PF4_AVATARS;
case PFLAG_MAXLENOFMESSAGE:
return 159; // 140 + <max length of a users name (15 apparently)> + 4 ("RT @"). this allows for the new style retweets
case PFLAG_UNIQUEIDTEXT:
@@ -136,19 +136,11 @@ void TwitterProto::SendSuccess(void *p) delete data;
}
-int TwitterProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
+int TwitterProto::SendMsg(MCONTACT hContact, int, const char *msg)
{
if (m_iStatus != ID_STATUS_ONLINE)
return 0;
- TCHAR *tszMsg;
- if (flags & PREF_UTF)
- tszMsg = mir_utf8decodeT(msg);
- else if (flags & PREF_UNICODE)
- tszMsg = mir_u2t((wchar_t*)&msg[strlen(msg) + 1]);
- else
- tszMsg = mir_a2t(msg);
-
int seq = InterlockedIncrement(&g_msgid);
ForkThread(&TwitterProto::SendSuccess, new send_direct(hContact, msg, seq));
return seq;
|