Changes in protocols/oscar/oscar.c [3dc6d86:56699f0]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/oscar.c
r3dc6d86 r56699f0 254 254 255 255 u = t = g_strdup(s); 256 257 strcpy(t, s);258 256 g_strdown(t); 259 257 … … 290 288 odata = (struct oscar_data *)ic->proto_data; 291 289 292 if (condition & GAIM_INPUT_READ) {290 if (condition & B_EV_IO_READ) { 293 291 if (aim_get_command(odata->sess, conn) >= 0) { 294 292 aim_rxdispatch(odata->sess); … … 362 360 363 361 aim_conn_completeconnect(sess, conn); 364 ic->inpa = b_input_add(conn->fd, GAIM_INPUT_READ,362 ic->inpa = b_input_add(conn->fd, B_EV_IO_READ, 365 363 oscar_callback, conn); 366 364 … … 493 491 494 492 aim_conn_completeconnect(sess, bosconn); 495 ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ,493 ic->inpa = b_input_add(bosconn->fd, B_EV_IO_READ, 496 494 oscar_callback, bosconn); 497 495 imcb_log(ic, _("Connection established, cookie sent")); … … 652 650 struct im_connection *ic = sess->aux_data; 653 651 struct chat_connection *chatcon; 652 struct groupchat *c = NULL; 654 653 static int id = 1; 655 654 … … 664 663 chatcon = find_oscar_chat_by_conn(ic, fr->conn); 665 664 chatcon->id = id; 666 chatcon->cnv = imcb_chat_new(ic, chatcon->show); 665 666 c = bee_chat_by_title(ic->bee, ic, chatcon->show); 667 if (c && !c->data) 668 chatcon->cnv = c; 669 else 670 chatcon->cnv = imcb_chat_new(ic, chatcon->show); 667 671 chatcon->cnv->data = chatcon; 668 672 … … 703 707 704 708 aim_conn_completeconnect(sess, tstconn); 705 odata->cnpa = b_input_add(tstconn->fd, GAIM_INPUT_READ,709 odata->cnpa = b_input_add(tstconn->fd, B_EV_IO_READ, 706 710 oscar_callback, tstconn); 707 711 … … 731 735 732 736 aim_conn_completeconnect(sess, tstconn); 733 odata->paspa = b_input_add(tstconn->fd, GAIM_INPUT_READ,737 odata->paspa = b_input_add(tstconn->fd, B_EV_IO_READ, 734 738 oscar_callback, tstconn); 735 739 … … 767 771 aim_conn_completeconnect(sess, ccon->conn); 768 772 ccon->inpa = b_input_add(tstconn->fd, 769 GAIM_INPUT_READ,773 B_EV_IO_READ, 770 774 oscar_callback, tstconn); 771 775 odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon); … … 934 938 tmp = normalize(info->sn); 935 939 imcb_buddy_status(ic, tmp, flags, state_string, NULL); 936 /* imcb_buddy_times(ic, tmp, signon, time_idle); */940 imcb_buddy_times(ic, tmp, signon, time_idle); 937 941 938 942 … … 1060 1064 aim_ssi_auth_reply(od->sess, od->conn, uin, 1, ""); 1061 1065 // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); 1062 if(imcb_find_buddy(data->ic, uin) == NULL) 1063 imcb_ask_add(data->ic, uin, NULL); 1066 imcb_ask_add(data->ic, uin, NULL); 1064 1067 1065 1068 g_free(uin); … … 1822 1825 struct oscar_data *odata = (struct oscar_data *)g->proto_data; 1823 1826 if (odata->icq) { 1827 /** FIXME(wilmer): Hmm, lost the ability to get away msgs here, do we care to get that back? 1824 1828 struct buddy *budlight = imcb_find_buddy(g, who); 1825 1829 if (budlight) … … 1827 1831 if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) 1828 1832 aim_send_im_ch2_geticqmessage(odata->sess, who, (budlight->uc & 0xff80) >> 7); 1833 */ 1829 1834 } else 1830 1835 aim_getinfo(odata->sess, odata->conn, who, AIM_GETINFO_AWAYMESSAGE); … … 1953 1958 static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) { 1954 1959 struct im_connection *ic = sess->aux_data; 1955 struct aim_ssi_item *curitem ;1960 struct aim_ssi_item *curitem, *curgroup; 1956 1961 int tmp; 1957 1962 char *nrm; … … 1964 1969 switch (curitem->type) { 1965 1970 case 0x0000: /* Buddy */ 1966 if ((curitem->name) && (!imcb_ find_buddy(ic, nrm))) {1971 if ((curitem->name) && (!imcb_buddy_by_handle(ic, nrm))) { 1967 1972 char *realname = NULL; 1968 1973 1969 1974 if (curitem->data && aim_gettlv(curitem->data, 0x0131, 1)) 1970 1975 realname = aim_gettlv_str(curitem->data, 0x0131, 1); 1971 1972 imcb_add_buddy(ic, nrm, NULL);1976 1977 imcb_add_buddy(ic, nrm, curgroup->gid == curitem->gid ? curgroup->name : NULL); 1973 1978 1974 1979 if (realname) { … … 1978 1983 } 1979 1984 } 1985 break; 1986 1987 case 0x0001: /* Group */ 1988 curgroup = curitem; 1980 1989 break; 1981 1990 … … 2520 2529 static int chat_id = 0; 2521 2530 char * chatname; 2531 struct groupchat *c; 2522 2532 2523 2533 chatname = g_strdup_printf("%s%s_%d", isdigit(*ic->acc->user) ? "icq_" : "", 2524 2534 ic->acc->user, chat_id++); 2525 2535 2536 c = imcb_chat_new(ic, chatname); 2526 2537 ret = oscar_chat_join(ic, chatname, NULL, NULL); 2527 2528 2538 aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0); 2529 2539
Note: See TracChangeset
for help on using the changeset viewer.