diff options
Diffstat (limited to 'tipper/message_pump.cpp')
-rw-r--r-- | tipper/message_pump.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp index 66013b7..01f172e 100644 --- a/tipper/message_pump.cpp +++ b/tipper/message_pump.cpp @@ -160,24 +160,8 @@ int HideTip(WPARAM wParam, LPARAM lParam) { int ProtoAck(WPARAM wParam, LPARAM lParam) {
ACKDATA *ack = (ACKDATA *)lParam;
char *szMsg = (char *)ack->lParam;
- if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS && szMsg) {
- /*
- int size = MultiByteToWideChar(code_page, 0, szMsg, -1, 0, 0);
- if(size > 1) {
- wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
- MultiByteToWideChar(code_page, 0, (char *) szMsg, -1, msg, size);
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
- }
- */
- /*
- int size = MultiByteToWideChar(CP_UTF8, 0, szMsg, -1, 0, 0);
- if(size > 1) {
- wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
- MultiByteToWideChar(CP_UTF8, 0, (char *) szMsg, -1, msg, size);
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
- }
- */
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)u2t(szMsg));
+ if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS && szMsg && szMsg[0]) {
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)a2t(szMsg));
}
return 0;
}
|