Changeset 68b518d6 for protocols/oscar
- Timestamp:
- 2006-05-26T09:03:38Z (19 years ago)
- Branches:
- master
- Children:
- cdca30b
- Parents:
- 41ca004 (diff), c53911e (diff), 7bfd574 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols/oscar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/aim.h
r41ca004 r68b518d6 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
r41ca004 r68b518d6 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 /* 166 if (flags & AIM_CHATFLAGS_UNICODE) 167 aimbs_put16(&fr->data, 0x0002); 168 else if (flags & AIM_CHATFLAGS_ISO_8859_1) 169 aimbs_put16(&fr->data, 0x0003); 170 else 171 aimbs_put16(&fr->data, 0x0000); 172 173 aimbs_put16(&fr->data, 0x0000); 174 */ 175 162 176 /* 163 177 * SubTLV: Type 1: Message -
protocols/oscar/im.c
r41ca004 r68b518d6 1469 1469 case 0x9c: /* ICQ 5 seems to send this */ 1470 1470 aim_send_im_ch2_statusmessage(sess, userinfo->sn, args->cookie, 1471 gc->away , sess->aim_icq_state, dc);1471 gc->away ? gc->away : "", sess->aim_icq_state, dc); 1472 1472 break; 1473 1473 -
protocols/oscar/oscar.c
r41ca004 r68b518d6 2 2 * gaim 3 3 * 4 * Some code copyright (C) 2002-2006, Jelmer Vernooij <jelmer@samba.org> 5 * and the BitlBee team. 4 6 * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net> 5 7 * libfaim code copyright 1998, 1999 Adam Fritzler <afritz@auk.cx> … … 136 138 int i, j; 137 139 char *x = strchr(name, '-'); 138 if (!x) return NULL;140 if (!x) return g_strdup(name); 139 141 x = strchr(++x, '-'); 140 if (!x) return NULL;142 if (!x) return g_strdup(name); 141 143 tmp = g_strdup(++x); 142 144 … … 390 392 if (g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 && 391 393 g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) { 392 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails." );394 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",user->proto_opt[USEROPT_AUTH]); 393 395 } 394 396 … … 2517 2519 int ret; 2518 2520 guint8 len = strlen(message); 2521 guint16 flags; 2519 2522 char *s; 2520 2523 … … 2525 2528 if (*s & 128) 2526 2529 break; 2527 2530 2531 flags = AIM_CHATFLAGS_NOREFLECT; 2532 2528 2533 /* Message contains high ASCII chars, time for some translation! */ 2529 2534 if (*s) { … … 2532 2537 If we can't, fall back to UTF16. */ 2533 2538 if ((ret = do_iconv("UTF-8", "ISO8859-1", message, s, len, BUF_LONG)) >= 0) { 2539 flags |= AIM_CHATFLAGS_ISO_8859_1; 2534 2540 len = ret; 2535 2541 } else if ((ret = do_iconv("UTF-8", "UNICODEBIG", message, s, len, BUF_LONG)) >= 0) { 2542 flags |= AIM_CHATFLAGS_UNICODE; 2536 2543 len = ret; 2537 2544 } else { … … 2544 2551 } 2545 2552 2546 ret = aim_chat_send_im(od->sess, ccon->conn, AIM_CHATFLAGS_NOREFLECT, s, len);2553 ret = aim_chat_send_im(od->sess, ccon->conn, flags, s, len); 2547 2554 2548 2555 if (s != message) { … … 2617 2624 int ret; 2618 2625 static int chat_id = 0; 2619 char * chatname = g_new0(char, strlen(gc->username)+4);2620 2621 g_snprintf(chatname, strlen(gc->username) + 4,"%s%d", gc->username, chat_id++);2626 char * chatname; 2627 2628 chatname = g_strdup_printf("%s%d", gc->username, chat_id++); 2622 2629 2623 2630 ret = oscar_chat_join(gc, chatname);
Note: See TracChangeset
for help on using the changeset viewer.