- Timestamp:
- 2006-05-22T09:11:49Z (19 years ago)
- Branches:
- master
- Children:
- 226fce1
- Parents:
- 619a681
- Location:
- protocols/oscar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/aim.h
r619a681 r73cf7fd 728 728 }; 729 729 730 #define AIM_CHATFLAGS_NOREFLECT 0x0001 731 #define AIM_CHATFLAGS_AWAY 0x0002 730 #define AIM_CHATFLAGS_NOREFLECT 0x0001 731 #define AIM_CHATFLAGS_AWAY 0x0002 732 #define AIM_CHATFLAGS_UNICODE 0x0004 733 #define AIM_CHATFLAGS_ISO_8859_1 0x0008 734 732 735 int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const char *msg, int msglen); 733 736 int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance); -
protocols/oscar/chat.c
r619a681 r73cf7fd 159 159 if (flags & AIM_CHATFLAGS_AWAY) 160 160 aim_addtlvtochain_noval(&otl, 0x0007); 161 161 162 /* [WvG] This wasn't there originally, but we really should send 163 the right charset flags, as we also do with normal 164 messages. Hope this will work. :-) */ 165 if (flags & AIM_CHATFLAGS_UNICODE) 166 aimbs_put16(&fr->data, 0x0002); 167 else if (flags & AIM_CHATFLAGS_ISO_8859_1) 168 aimbs_put16(&fr->data, 0x0003); 169 else 170 aimbs_put16(&fr->data, 0x0000); 171 172 aimbs_put16(&fr->data, 0x0000); 173 162 174 /* 163 175 * SubTLV: Type 1: Message -
protocols/oscar/oscar.c
r619a681 r73cf7fd 2502 2502 int ret; 2503 2503 guint8 len = strlen(message); 2504 guint16 flags; 2504 2505 char *s; 2505 2506 … … 2510 2511 if (*s & 128) 2511 2512 break; 2512 2513 2514 flags = AIM_CHATFLAGS_NOREFLECT; 2515 2513 2516 /* Message contains high ASCII chars, time for some translation! */ 2514 2517 if (*s) { … … 2517 2520 If we can't, fall back to UTF16. */ 2518 2521 if ((ret = do_iconv("UTF-8", "ISO8859-1", message, s, len, BUF_LONG)) >= 0) { 2522 flags |= AIM_CHATFLAGS_ISO_8859_1; 2519 2523 len = ret; 2520 2524 } else if ((ret = do_iconv("UTF-8", "UNICODEBIG", message, s, len, BUF_LONG)) >= 0) { 2525 flags |= AIM_CHATFLAGS_UNICODE; 2521 2526 len = ret; 2522 2527 } else { … … 2529 2534 } 2530 2535 2531 ret = aim_chat_send_im(od->sess, ccon->conn, AIM_CHATFLAGS_NOREFLECT, s, len);2536 ret = aim_chat_send_im(od->sess, ccon->conn, flags, s, len); 2532 2537 2533 2538 if (s != message) {
Note: See TracChangeset
for help on using the changeset viewer.