Changeset 68b518d6 for protocols/oscar/oscar.c
- Timestamp:
- 2006-05-26T09:03:38Z (18 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.