summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/fam_03buddy.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-17 14:07:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-17 14:07:44 +0000
commit122baf7f7465e0b5b890729d65914f527db1ca26 (patch)
tree117f5fe7914b636a5d99577235e58727c8ddedb3 /protocols/IcqOscarJ/fam_03buddy.cpp
parent5b68af4bce0056e373e69bf16fb7d3bdfac96dd8 (diff)
Unicode ACKTYPE_AWAYMSG broadcast
git-svn-id: http://svn.miranda-ng.org/main/trunk@458 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/fam_03buddy.cpp')
-rw-r--r--protocols/IcqOscarJ/fam_03buddy.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/protocols/IcqOscarJ/fam_03buddy.cpp b/protocols/IcqOscarJ/fam_03buddy.cpp
index b551066248..3819972a8b 100644
--- a/protocols/IcqOscarJ/fam_03buddy.cpp
+++ b/protocols/IcqOscarJ/fam_03buddy.cpp
@@ -760,20 +760,12 @@ void CIcqProto::parseStatusNote(DWORD dwUin, char *szUid, HANDLE hContact, oscar
deleteSetting(hContact, DBSETTING_STATUS_NOTE);
setSettingDword(hContact, DBSETTING_STATUS_NOTE_TIME, dwStatusNoteTS);
- { // Broadcast a notification
- int nNoteLen = strlennull(szStatusNote);
- char *szNoteAnsi = NULL;
-
- if (nNoteLen)
- { // the broadcast does not support unicode
- szNoteAnsi = (char*)_alloca(nNoteLen + 1);
- utf8_decode_static(szStatusNote, szNoteAnsi, strlennull(szStatusNote) + 1);
- }
- if (getContactXStatus(hContact) != 0 || !CheckContactCapabilities(hContact, CAPF_STATUS_MESSAGES))
- {
- setStatusMsgVar(hContact, szStatusNote, false);
- BroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)szNoteAnsi);
- }
+ if (getContactXStatus(hContact) != 0 || !CheckContactCapabilities(hContact, CAPF_STATUS_MESSAGES)) {
+ setStatusMsgVar(hContact, szStatusNote, false);
+
+ TCHAR* tszNote = mir_utf8decodeT(szStatusNote);
+ BroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszNote);
+ mir_free(tszNote);
}
}
SAFE_FREE(&szStatusNote);