From 3793a9bd61778cb068aa5338476a5513c13b989f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 20 Jan 2014 14:13:03 +0000 Subject: XFire: Fix for sending messages (and statuses) with unicode characters git-svn-id: http://svn.miranda-ng.org/main/trunk@7787 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'protocols/Xfire') diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index eb0d025c90..b663fd50b5 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -332,7 +332,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { SendStatusMessagePacket *packet = new SendStatusMessagePacket(); - packet->awaymsg = s.c_str(); + packet->awaymsg = ptrA( mir_utf8encode(s.c_str())); client->send( packet ); delete packet; } @@ -1373,7 +1373,7 @@ INT_PTR SendMessage(WPARAM wParam, LPARAM lParam) if (myClient!=NULL) if (myClient->client->connected&&db_get_w(ccs->hContact, protocolname, "Status", -1)!=ID_STATUS_OFFLINE) { - myClient->sendmsg(dbv.pszVal, ( char* )ccs->lParam); + myClient->sendmsg(dbv.pszVal, ptrA( mir_utf8encode((char*)ccs->lParam))); mir_forkthread(SendAck,ccs->hContact); sended=1; } @@ -2639,9 +2639,6 @@ void setBuddyStatusMsg(BuddyListEntry *entry) db_unset(entry->hcontact, protocolname, "XStatusMsg"); } - //statusmsg umwandeln - entry->statusmsg = ptrA(mir_utf8decode((char*)entry->statusmsg.c_str(), NULL)); - string afk = entry->statusmsg.substr(0, 5); int status_id = (afk == "(AFK)" || afk == "(ABS)") ? ID_STATUS_AWAY : ID_STATUS_ONLINE; -- cgit v1.2.3