diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-01-20 14:13:03 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-01-20 14:13:03 +0000 |
commit | 3793a9bd61778cb068aa5338476a5513c13b989f (patch) | |
tree | f4288b23b78d5f01d79dece65cece945cd97b9c8 /protocols/Xfire/src | |
parent | 79600821a72ba7fd7835db8f9f26207b7d2758f5 (diff) |
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
Diffstat (limited to 'protocols/Xfire/src')
-rw-r--r-- | protocols/Xfire/src/main.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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;
|