From 48266e479d1fcf5153b29c612866845990fccad8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 May 2015 16:11:58 +0000 Subject: 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 --- protocols/Steam/src/steam_proto.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'protocols/Steam/src/steam_proto.cpp') diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 405f598d5e..9196e03aa5 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -202,7 +202,7 @@ DWORD_PTR __cdecl CSteamProto:: GetCaps(int type, MCONTACT) case PFLAGNUM_2: return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; case PFLAGNUM_4: - return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_IMSENDUTF | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; + return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; case PFLAGNUM_5: return PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; case PFLAG_UNIQUEIDTEXT: @@ -240,7 +240,7 @@ int __cdecl CSteamProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, lstrlenA(pre->szMessage), (BYTE*)pre->szMessage); } -int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *msg) +int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int, const char *msg) { UINT hMessage = InterlockedIncrement(&hMessageProcess); @@ -248,10 +248,7 @@ int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *msg) param->hContact = hContact; param->hMessage = (HANDLE)hMessage; param->msg = msg; - param->flags = flags; - ForkThread(&CSteamProto::SendMsgThread, (void*)param); - return hMessage; } @@ -266,14 +263,12 @@ void __cdecl CSteamProto::SendMsgThread(void *arg) return; } - CMStringA message = (param->flags & PREF_UNICODE) ? ptrA(mir_utf8encode(param->msg)) : param->msg; // TODO: mir_utf8encode check taken from FacebookRM, is it needed? Usually we get PREF_UTF8 flag instead. - ptrA token(getStringA("TokenSecret")); ptrA umqid(getStringA("UMQID")); ptrA steamId(getStringA(param->hContact, "SteamID")); PushRequest( - new SteamWebApi::SendMessageRequest(token, umqid, steamId, message), + new SteamWebApi::SendMessageRequest(token, umqid, steamId, param->msg), &CSteamProto::OnMessageSent, param, ARG_MIR_FREE); -- cgit v1.2.3