Changeset 9779c18 for protocols/oscar/oscar.c
- Timestamp:
- 2006-06-03T20:20:43Z (18 years ago)
- Branches:
- master
- Children:
- 5973412
- Parents:
- a15c097 (diff), fb62f81f (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
ra15c097 r9779c18 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 … … 383 385 if (g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 && 384 386 g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) { 385 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails." );387 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",user->proto_opt[USEROPT_AUTH]); 386 388 } 387 389 … … 1119 1121 aim_ssi_auth_reply(od->sess, od->conn, uin, 1, ""); 1120 1122 // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); 1121 show_got_added(data->gc, NULL, uin, NULL, NULL); 1123 if(find_buddy(data->gc, uin) == NULL) 1124 show_got_added(data->gc, uin, NULL); 1122 1125 1123 1126 g_free(uin); … … 2057 2060 name = g_strdup(normalize(curitem->name)); 2058 2061 gc->permit = g_slist_append(gc->permit, name); 2059 build_allow_list();2060 2062 tmp++; 2061 2063 } … … 2071 2073 name = g_strdup(normalize(curitem->name)); 2072 2074 gc->deny = g_slist_append(gc->deny, name); 2073 build_block_list();2074 2075 tmp++; 2075 2076 } … … 2277 2278 tm.tm_mday = (int)info->birthday; 2278 2279 tm.tm_mon = (int)info->birthmonth-1; 2279 tm.tm_year = (int)info->birthyear -1900;2280 tm.tm_year = (int)info->birthyear%100; 2280 2281 strftime(date, sizeof(date), "%Y-%m-%d", &tm); 2281 2282 info_string_append(str, "\n", _("Birthday"), date); … … 2501 2502 int ret; 2502 2503 guint8 len = strlen(message); 2504 guint16 flags; 2503 2505 char *s; 2504 2506 … … 2509 2511 if (*s & 128) 2510 2512 break; 2511 2513 2514 flags = AIM_CHATFLAGS_NOREFLECT; 2515 2512 2516 /* Message contains high ASCII chars, time for some translation! */ 2513 2517 if (*s) { … … 2516 2520 If we can't, fall back to UTF16. */ 2517 2521 if ((ret = do_iconv("UTF-8", "ISO8859-1", message, s, len, BUF_LONG)) >= 0) { 2522 flags |= AIM_CHATFLAGS_ISO_8859_1; 2518 2523 len = ret; 2519 2524 } else if ((ret = do_iconv("UTF-8", "UNICODEBIG", message, s, len, BUF_LONG)) >= 0) { 2525 flags |= AIM_CHATFLAGS_UNICODE; 2520 2526 len = ret; 2521 2527 } else { … … 2528 2534 } 2529 2535 2530 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); 2531 2537 2532 2538 if (s != message) { … … 2601 2607 int ret; 2602 2608 static int chat_id = 0; 2603 char * chatname = g_new0(char, strlen(gc->username)+4);2604 2605 g_snprintf(chatname, strlen(gc->username) + 4,"%s%d", gc->username, chat_id++);2609 char * chatname; 2610 2611 chatname = g_strdup_printf("%s%d", gc->username, chat_id++); 2606 2612 2607 2613 ret = oscar_chat_join(gc, chatname);
Note: See TracChangeset
for help on using the changeset viewer.