Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 32308:3e4b6ffbb551
propagate from branch 'im.pidgin.pidgin' (head 64f4eb5c598356fe1b8b9bc376faa66641096eda)
to branch 'im.pidgin.pidgin.next.major' (head 950eb2e674f6da789c0132765c4f2d68ccd0d617)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Jun 2011 17:56:24 +0000 |
parents | 8b2fa46cdfd5 4c046f6564cd |
children | 142429bcb4c8 |
comparison
equal
deleted
inserted
replaced
32115:3a3af6ad3166 | 32308:3e4b6ffbb551 |
---|---|
576 guint32 presence; | 576 guint32 presence; |
577 | 577 |
578 gc = data; | 578 gc = data; |
579 od = purple_connection_get_protocol_data(gc); | 579 od = purple_connection_get_protocol_data(gc); |
580 report_idle = strcmp((const char *)value, "none") != 0; | 580 report_idle = strcmp((const char *)value, "none") != 0; |
581 presence = aim_ssi_getpresence(od->ssi.local); | 581 presence = aim_ssi_getpresence(&od->ssi.local); |
582 | 582 |
583 if (report_idle) | 583 if (report_idle) |
584 aim_ssi_setpresence(od, presence | AIM_SSI_PRESENCE_FLAG_SHOWIDLE); | 584 aim_ssi_setpresence(od, presence | AIM_SSI_PRESENCE_FLAG_SHOWIDLE); |
585 else | 585 else |
586 aim_ssi_setpresence(od, presence & ~AIM_SSI_PRESENCE_FLAG_SHOWIDLE); | 586 aim_ssi_setpresence(od, presence & ~AIM_SSI_PRESENCE_FLAG_SHOWIDLE); |
598 OscarData *od; | 598 OscarData *od; |
599 guint32 presence; | 599 guint32 presence; |
600 | 600 |
601 gc = data; | 601 gc = data; |
602 od = purple_connection_get_protocol_data(gc); | 602 od = purple_connection_get_protocol_data(gc); |
603 presence = aim_ssi_getpresence(od->ssi.local); | 603 presence = aim_ssi_getpresence(&od->ssi.local); |
604 | 604 |
605 if (value) | 605 if (value) |
606 aim_ssi_setpresence(od, presence & ~AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES); | 606 aim_ssi_setpresence(od, presence & ~AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES); |
607 else | 607 else |
608 aim_ssi_setpresence(od, presence | AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES); | 608 aim_ssi_setpresence(od, presence | AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES); |
739 g_free(buf); | 739 g_free(buf); |
740 return; | 740 return; |
741 } | 741 } |
742 | 742 |
743 gc->flags |= PURPLE_CONNECTION_HTML; | 743 gc->flags |= PURPLE_CONNECTION_HTML; |
744 if (oscar_util_valid_name_icq((purple_account_get_username(account)))) { | 744 if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq")) { |
745 od->icq = TRUE; | 745 od->icq = TRUE; |
746 gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS; | 746 gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS; |
747 } else { | 747 } else { |
748 gc->flags |= PURPLE_CONNECTION_AUTO_RESP; | 748 gc->flags |= PURPLE_CONNECTION_AUTO_RESP; |
749 } | 749 } |
3710 | 3710 |
3711 return; | 3711 return; |
3712 } | 3712 } |
3713 | 3713 |
3714 if (od->ssi.received_data) { | 3714 if (od->ssi.received_data) { |
3715 if (!aim_ssi_itemlist_finditem(od->ssi.local, gname, bname, AIM_SSI_TYPE_BUDDY)) { | 3715 if (!aim_ssi_itemlist_finditem(&od->ssi.local, gname, bname, AIM_SSI_TYPE_BUDDY)) { |
3716 purple_debug_info("oscar", | 3716 purple_debug_info("oscar", |
3717 "ssi: adding buddy %s to group %s\n", bname, gname); | 3717 "ssi: adding buddy %s to group %s\n", bname, gname); |
3718 aim_ssi_addbuddy(od, bname, gname, NULL, purple_buddy_get_alias_only(buddy), NULL, NULL, 0); | 3718 aim_ssi_addbuddy(od, bname, gname, NULL, purple_buddy_get_alias_only(buddy), NULL, NULL, 0); |
3719 | 3719 |
3720 /* Mobile users should always be online */ | 3720 /* Mobile users should always be online */ |
3722 purple_prpl_got_user_status(account, bname, | 3722 purple_prpl_got_user_status(account, bname, |
3723 OSCAR_STATUS_ID_AVAILABLE, NULL); | 3723 OSCAR_STATUS_ID_AVAILABLE, NULL); |
3724 purple_prpl_got_user_status(account, bname, | 3724 purple_prpl_got_user_status(account, bname, |
3725 OSCAR_STATUS_ID_MOBILE, NULL); | 3725 OSCAR_STATUS_ID_MOBILE, NULL); |
3726 } | 3726 } |
3727 } else if (aim_ssi_waitingforauth(od->ssi.local, | 3727 } else if (aim_ssi_waitingforauth(&od->ssi.local, |
3728 aim_ssi_itemlist_findparentname(od->ssi.local, bname), | 3728 aim_ssi_itemlist_findparentname(&od->ssi.local, bname), |
3729 bname)) { | 3729 bname)) { |
3730 /* Not authorized -- Re-request authorization */ | 3730 /* Not authorized -- Re-request authorization */ |
3731 oscar_auth_sendrequest(gc, bname, msg); | 3731 oscar_auth_sendrequest(gc, bname, msg); |
3732 } | 3732 } |
3733 } | 3733 } |
3761 | 3761 |
3762 void oscar_alias_buddy(PurpleConnection *gc, const char *name, const char *alias) { | 3762 void oscar_alias_buddy(PurpleConnection *gc, const char *name, const char *alias) { |
3763 OscarData *od = purple_connection_get_protocol_data(gc); | 3763 OscarData *od = purple_connection_get_protocol_data(gc); |
3764 | 3764 |
3765 if (od->ssi.received_data) { | 3765 if (od->ssi.received_data) { |
3766 char *gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); | 3766 char *gname = aim_ssi_itemlist_findparentname(&od->ssi.local, name); |
3767 if (gname) { | 3767 if (gname) { |
3768 purple_debug_info("oscar", | 3768 purple_debug_info("oscar", |
3769 "ssi: changing the alias for buddy %s to %s\n", name, alias ? alias : "(none)"); | 3769 "ssi: changing the alias for buddy %s to %s\n", name, alias ? alias : "(none)"); |
3770 aim_ssi_aliasbuddy(od, gname, name, alias); | 3770 aim_ssi_aliasbuddy(od, gname, name, alias); |
3771 } | 3771 } |
3778 void oscar_rename_group(PurpleConnection *gc, const char *old_name, PurpleGroup *group, GList *moved_buddies) { | 3778 void oscar_rename_group(PurpleConnection *gc, const char *old_name, PurpleGroup *group, GList *moved_buddies) { |
3779 OscarData *od = purple_connection_get_protocol_data(gc); | 3779 OscarData *od = purple_connection_get_protocol_data(gc); |
3780 | 3780 |
3781 if (od->ssi.received_data) { | 3781 if (od->ssi.received_data) { |
3782 const char *gname = purple_group_get_name(group); | 3782 const char *gname = purple_group_get_name(group); |
3783 if (aim_ssi_itemlist_finditem(od->ssi.local, gname, NULL, AIM_SSI_TYPE_GROUP)) { | 3783 if (aim_ssi_itemlist_finditem(&od->ssi.local, gname, NULL, AIM_SSI_TYPE_GROUP)) { |
3784 GList *cur, *groups = NULL; | 3784 GList *cur, *groups = NULL; |
3785 PurpleAccount *account = purple_connection_get_account(gc); | 3785 PurpleAccount *account = purple_connection_get_account(gc); |
3786 | 3786 |
3787 /* Make a list of what the groups each buddy is in */ | 3787 /* Make a list of what the groups each buddy is in */ |
3788 for (cur = moved_buddies; cur != NULL; cur = cur->next) { | 3788 for (cur = moved_buddies; cur != NULL; cur = cur->next) { |
3929 b = buddies->data; | 3929 b = buddies->data; |
3930 g = purple_buddy_get_group(b); | 3930 g = purple_buddy_get_group(b); |
3931 gname = purple_group_get_name(g); | 3931 gname = purple_group_get_name(g); |
3932 bname = purple_buddy_get_name(b); | 3932 bname = purple_buddy_get_name(b); |
3933 | 3933 |
3934 if (aim_ssi_itemlist_exists(od->ssi.local, bname)) { | 3934 if (aim_ssi_itemlist_exists(&od->ssi.local, bname)) { |
3935 /* If the buddy is an ICQ user then load his nickname */ | 3935 /* If the buddy is an ICQ user then load his nickname */ |
3936 const char *servernick = purple_blist_node_get_string((PurpleBlistNode*)b, "servernick"); | 3936 const char *servernick = purple_blist_node_get_string((PurpleBlistNode*)b, "servernick"); |
3937 char *alias; | 3937 char *alias; |
3938 const char *balias; | 3938 const char *balias; |
3939 if (servernick) | 3939 if (servernick) |
3940 serv_got_alias(gc, bname, servernick); | 3940 serv_got_alias(gc, bname, servernick); |
3941 | 3941 |
3942 /* Store local alias on server */ | 3942 /* Store local alias on server */ |
3943 alias = aim_ssi_getalias(od->ssi.local, gname, bname); | 3943 alias = aim_ssi_getalias(&od->ssi.local, gname, bname); |
3944 balias = purple_buddy_get_local_buddy_alias(b); | 3944 balias = purple_buddy_get_local_buddy_alias(b); |
3945 if (!alias && balias && *balias) | 3945 if (!alias && balias && *balias) |
3946 aim_ssi_aliasbuddy(od, gname, bname, balias); | 3946 aim_ssi_aliasbuddy(od, gname, bname, balias); |
3947 g_free(alias); | 3947 g_free(alias); |
3948 } else { | 3948 } else { |
3961 if (!od->icq) { | 3961 if (!od->icq) { |
3962 next = account->permit; | 3962 next = account->permit; |
3963 while (next != NULL) { | 3963 while (next != NULL) { |
3964 cur = next; | 3964 cur = next; |
3965 next = next->next; | 3965 next = next->next; |
3966 if (!aim_ssi_itemlist_finditem(od->ssi.local, NULL, cur->data, AIM_SSI_TYPE_PERMIT)) { | 3966 if (!aim_ssi_itemlist_finditem(&od->ssi.local, NULL, cur->data, AIM_SSI_TYPE_PERMIT)) { |
3967 purple_debug_info("oscar", | 3967 purple_debug_info("oscar", |
3968 "ssi: removing permit %s from local list\n", (const char *)cur->data); | 3968 "ssi: removing permit %s from local list\n", (const char *)cur->data); |
3969 purple_privacy_permit_remove(account, cur->data, TRUE); | 3969 purple_privacy_permit_remove(account, cur->data, TRUE); |
3970 } | 3970 } |
3971 } | 3971 } |
3974 /* Deny list */ | 3974 /* Deny list */ |
3975 next = account->deny; | 3975 next = account->deny; |
3976 while (next != NULL) { | 3976 while (next != NULL) { |
3977 cur = next; | 3977 cur = next; |
3978 next = next->next; | 3978 next = next->next; |
3979 if (!aim_ssi_itemlist_finditem(od->ssi.local, NULL, cur->data, deny_entry_type)) { | 3979 if (!aim_ssi_itemlist_finditem(&od->ssi.local, NULL, cur->data, deny_entry_type)) { |
3980 purple_debug_info("oscar", | 3980 purple_debug_info("oscar", |
3981 "ssi: removing deny %s from local list\n", (const char *)cur->data); | 3981 "ssi: removing deny %s from local list\n", (const char *)cur->data); |
3982 purple_privacy_deny_remove(account, cur->data, TRUE); | 3982 purple_privacy_deny_remove(account, cur->data, TRUE); |
3983 } | 3983 } |
3984 } | 3984 } |
3985 | 3985 |
3986 /* Presence settings (idle time visibility) */ | 3986 /* Presence settings (idle time visibility) */ |
3987 tmp = aim_ssi_getpresence(od->ssi.local); | 3987 tmp = aim_ssi_getpresence(&od->ssi.local); |
3988 if (tmp != 0xFFFFFFFF) { | 3988 if (tmp != 0xFFFFFFFF) { |
3989 const char *idle_reporting_pref; | 3989 const char *idle_reporting_pref; |
3990 gboolean report_idle; | 3990 gboolean report_idle; |
3991 | 3991 |
3992 idle_reporting_pref = purple_prefs_get_string("/purple/away/idle_reporting"); | 3992 idle_reporting_pref = purple_prefs_get_string("/purple/away/idle_reporting"); |
4000 | 4000 |
4001 /*** End code for pruning buddies from local list ***/ | 4001 /*** End code for pruning buddies from local list ***/ |
4002 | 4002 |
4003 /*** Begin code for adding from server list to local list ***/ | 4003 /*** Begin code for adding from server list to local list ***/ |
4004 | 4004 |
4005 for (curitem=od->ssi.local; curitem; curitem=curitem->next) { | 4005 for (curitem=od->ssi.local.data; curitem; curitem=curitem->next) { |
4006 if (curitem->name && !g_utf8_validate(curitem->name, -1, NULL)) { | 4006 if (curitem->name && !g_utf8_validate(curitem->name, -1, NULL)) { |
4007 /* Got node with invalid UTF-8 in the name. Skip it. */ | 4007 /* Got node with invalid UTF-8 in the name. Skip it. */ |
4008 purple_debug_warning("oscar", "ssi: server list contains item of " | 4008 purple_debug_warning("oscar", "ssi: server list contains item of " |
4009 "type 0x%04hhx with a non-utf8 name\n", curitem->type); | 4009 "type 0x%04hhx with a non-utf8 name\n", curitem->type); |
4010 continue; | 4010 continue; |
4014 case AIM_SSI_TYPE_BUDDY: { /* Buddy */ | 4014 case AIM_SSI_TYPE_BUDDY: { /* Buddy */ |
4015 if (curitem->name) { | 4015 if (curitem->name) { |
4016 struct aim_ssi_item *groupitem; | 4016 struct aim_ssi_item *groupitem; |
4017 char *gname, *gname_utf8, *alias, *alias_utf8; | 4017 char *gname, *gname_utf8, *alias, *alias_utf8; |
4018 | 4018 |
4019 groupitem = aim_ssi_itemlist_find(od->ssi.local, curitem->gid, 0x0000); | 4019 groupitem = aim_ssi_itemlist_find(&od->ssi.local, curitem->gid, 0x0000); |
4020 gname = groupitem ? groupitem->name : NULL; | 4020 gname = groupitem ? groupitem->name : NULL; |
4021 gname_utf8 = oscar_utf8_try_convert(account, od, gname); | 4021 gname_utf8 = oscar_utf8_try_convert(account, od, gname); |
4022 | 4022 |
4023 g = purple_find_group(gname_utf8 ? gname_utf8 : _("Orphans")); | 4023 g = purple_find_group(gname_utf8 ? gname_utf8 : _("Orphans")); |
4024 if (g == NULL) { | 4024 if (g == NULL) { |
4025 g = purple_group_new(gname_utf8 ? gname_utf8 : _("Orphans")); | 4025 g = purple_group_new(gname_utf8 ? gname_utf8 : _("Orphans")); |
4026 purple_blist_add_group(g, NULL); | 4026 purple_blist_add_group(g, NULL); |
4027 } | 4027 } |
4028 | 4028 |
4029 alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name); | 4029 alias = aim_ssi_getalias_from_item(curitem); |
4030 alias_utf8 = oscar_utf8_try_convert(account, od, alias); | 4030 alias_utf8 = oscar_utf8_try_convert(account, od, alias); |
4031 | 4031 |
4032 b = purple_find_buddy_in_group(account, curitem->name, g); | 4032 b = purple_find_buddy_in_group(account, curitem->name, g); |
4033 if (b) { | 4033 if (b) { |
4034 /* Get server stored alias */ | 4034 /* Get server stored alias */ |
4093 * for ICQ because, for ICQ, this setting controls who can | 4093 * for ICQ because, for ICQ, this setting controls who can |
4094 * see your online status when you are invisible. Thus it is | 4094 * see your online status when you are invisible. Thus it is |
4095 * a part of your status and not really related to blocking. | 4095 * a part of your status and not really related to blocking. |
4096 */ | 4096 */ |
4097 if (!od->icq && curitem->data) { | 4097 if (!od->icq && curitem->data) { |
4098 guint8 perm_deny = aim_ssi_getpermdeny(od->ssi.local); | 4098 guint8 perm_deny = aim_ssi_getpermdeny(&od->ssi.local); |
4099 if (perm_deny != 0 && perm_deny != account->perm_deny) | 4099 if (perm_deny != 0 && perm_deny != account->perm_deny) |
4100 { | 4100 { |
4101 purple_debug_info("oscar", | 4101 purple_debug_info("oscar", |
4102 "ssi: changing permdeny from %d to %hhu\n", account->perm_deny, perm_deny); | 4102 "ssi: changing permdeny from %d to %hhu\n", account->perm_deny, perm_deny); |
4103 account->perm_deny = perm_deny; | 4103 account->perm_deny = perm_deny; |
4222 va_end(ap); | 4222 va_end(ap); |
4223 | 4223 |
4224 if ((type != 0x0000) || (name == NULL)) | 4224 if ((type != 0x0000) || (name == NULL)) |
4225 return 1; | 4225 return 1; |
4226 | 4226 |
4227 gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); | 4227 gname = aim_ssi_itemlist_findparentname(&od->ssi.local, name); |
4228 gname_utf8 = gname ? oscar_utf8_try_convert(account, od, gname) : NULL; | 4228 gname_utf8 = gname ? oscar_utf8_try_convert(account, od, gname) : NULL; |
4229 | 4229 |
4230 alias = aim_ssi_getalias(od->ssi.local, gname, name); | 4230 alias = aim_ssi_getalias(&od->ssi.local, gname, name); |
4231 alias_utf8 = oscar_utf8_try_convert(account, od, alias); | 4231 alias_utf8 = oscar_utf8_try_convert(account, od, alias); |
4232 g_free(alias); | 4232 g_free(alias); |
4233 | 4233 |
4234 b = purple_find_buddy(account, name); | 4234 b = purple_find_buddy(account, name); |
4235 if (b) { | 4235 if (b) { |
4263 name, OSCAR_STATUS_ID_MOBILE, NULL); | 4263 name, OSCAR_STATUS_ID_MOBILE, NULL); |
4264 } | 4264 } |
4265 | 4265 |
4266 } | 4266 } |
4267 | 4267 |
4268 ssi_item = aim_ssi_itemlist_finditem(od->ssi.local, | 4268 ssi_item = aim_ssi_itemlist_finditem(&od->ssi.local, |
4269 gname, name, AIM_SSI_TYPE_BUDDY); | 4269 gname, name, AIM_SSI_TYPE_BUDDY); |
4270 if (ssi_item == NULL) | 4270 if (ssi_item == NULL) |
4271 { | 4271 { |
4272 purple_debug_error("oscar", "purple_ssi_parseaddmod: " | 4272 purple_debug_error("oscar", "purple_ssi_parseaddmod: " |
4273 "Could not find ssi item for oncoming buddy %s, " | 4273 "Could not find ssi item for oncoming buddy %s, " |
4580 } | 4580 } |
4581 | 4581 |
4582 const char *oscar_list_icon_icq(PurpleAccount *a, PurpleBuddy *b) | 4582 const char *oscar_list_icon_icq(PurpleAccount *a, PurpleBuddy *b) |
4583 { | 4583 { |
4584 const char *name = b ? purple_buddy_get_name(b) : NULL; | 4584 const char *name = b ? purple_buddy_get_name(b) : NULL; |
4585 if ((b == NULL) || (name == NULL) || oscar_util_valid_name_sms(name)) | 4585 if (name && !oscar_util_valid_name_sms(name) && oscar_util_valid_name_icq(name)) |
4586 { | |
4587 if (a == NULL || oscar_util_valid_name_icq(purple_account_get_username(a))) | |
4588 return "icq"; | |
4589 else | |
4590 return "aim"; | |
4591 } | |
4592 | |
4593 if (oscar_util_valid_name_icq(name)) | |
4594 return "icq"; | 4586 return "icq"; |
4595 return "aim"; | 4587 |
4588 return "icq"; | |
4596 } | 4589 } |
4597 | 4590 |
4598 const char *oscar_list_icon_aim(PurpleAccount *a, PurpleBuddy *b) | 4591 const char *oscar_list_icon_aim(PurpleAccount *a, PurpleBuddy *b) |
4599 { | 4592 { |
4600 const char *name = b ? purple_buddy_get_name(b) : NULL; | 4593 const char *name = b ? purple_buddy_get_name(b) : NULL; |
4601 if ((b == NULL) || (name == NULL) || oscar_util_valid_name_sms(name)) | 4594 if (name && !oscar_util_valid_name_sms(name) && oscar_util_valid_name_icq(name)) |
4602 { | |
4603 if (a != NULL && oscar_util_valid_name_icq(purple_account_get_username(a))) | |
4604 return "icq"; | |
4605 else | |
4606 return "aim"; | |
4607 } | |
4608 | |
4609 if (oscar_util_valid_name_icq(name)) | |
4610 return "icq"; | 4595 return "icq"; |
4596 | |
4611 return "aim"; | 4597 return "aim"; |
4612 } | 4598 } |
4613 | 4599 |
4614 const char *oscar_list_emblem(PurpleBuddy *b) | 4600 const char *oscar_list_emblem(PurpleBuddy *b) |
4615 { | 4601 { |
4636 status_id = purple_status_get_id(status); | 4622 status_id = purple_status_get_id(status); |
4637 | 4623 |
4638 if (purple_presence_is_online(presence) == FALSE) { | 4624 if (purple_presence_is_online(presence) == FALSE) { |
4639 char *gname; | 4625 char *gname; |
4640 if ((name) && (od) && (od->ssi.received_data) && | 4626 if ((name) && (od) && (od->ssi.received_data) && |
4641 (gname = aim_ssi_itemlist_findparentname(od->ssi.local, name)) && | 4627 (gname = aim_ssi_itemlist_findparentname(&od->ssi.local, name)) && |
4642 (aim_ssi_waitingforauth(od->ssi.local, gname, name))) { | 4628 (aim_ssi_waitingforauth(&od->ssi.local, gname, name))) { |
4643 return "not-authorized"; | 4629 return "not-authorized"; |
4644 } | 4630 } |
4645 } | 4631 } |
4646 | 4632 |
4647 if (userinfo != NULL ) { | 4633 if (userinfo != NULL ) { |
4704 id = purple_status_get_id(status); | 4690 id = purple_status_get_id(status); |
4705 | 4691 |
4706 if ((od != NULL) && !purple_presence_is_online(presence)) | 4692 if ((od != NULL) && !purple_presence_is_online(presence)) |
4707 { | 4693 { |
4708 const char *name = purple_buddy_get_name(b); | 4694 const char *name = purple_buddy_get_name(b); |
4709 char *gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); | 4695 char *gname = aim_ssi_itemlist_findparentname(&od->ssi.local, name); |
4710 if (aim_ssi_waitingforauth(od->ssi.local, gname, name)) | 4696 if (aim_ssi_waitingforauth(&od->ssi.local, gname, name)) |
4711 ret = g_strdup(_("Not Authorized")); | 4697 ret = g_strdup(_("Not Authorized")); |
4712 else | 4698 else |
4713 ret = g_strdup(_("Offline")); | 4699 ret = g_strdup(_("Offline")); |
4714 } | 4700 } |
4715 else | 4701 else |
4948 if (!(g = purple_buddy_get_group(buddy))) | 4934 if (!(g = purple_buddy_get_group(buddy))) |
4949 return; | 4935 return; |
4950 | 4936 |
4951 data = g_new(struct name_data, 1); | 4937 data = g_new(struct name_data, 1); |
4952 | 4938 |
4953 comment = aim_ssi_getcomment(od->ssi.local, purple_group_get_name(g), name); | 4939 comment = aim_ssi_getcomment(&od->ssi.local, purple_group_get_name(g), name); |
4954 comment_utf8 = comment ? oscar_utf8_try_convert(account, od, comment) : NULL; | 4940 comment_utf8 = comment ? oscar_utf8_try_convert(account, od, comment) : NULL; |
4955 | 4941 |
4956 data->gc = gc; | 4942 data->gc = gc; |
4957 data->name = g_strdup(name); | 4943 data->name = g_strdup(name); |
4958 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); | 4944 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); |
5169 /* | 5155 /* |
5170 * We only do this if the user is in our buddy list and we're | 5156 * We only do this if the user is in our buddy list and we're |
5171 * waiting for authorization. | 5157 * waiting for authorization. |
5172 */ | 5158 */ |
5173 char *gname; | 5159 char *gname; |
5174 gname = aim_ssi_itemlist_findparentname(od->ssi.local, bname); | 5160 gname = aim_ssi_itemlist_findparentname(&od->ssi.local, bname); |
5175 if (gname && aim_ssi_waitingforauth(od->ssi.local, gname, bname)) | 5161 if (gname && aim_ssi_waitingforauth(&od->ssi.local, gname, bname)) |
5176 { | 5162 { |
5177 act = purple_menu_action_new(_("Re-request Authorization"), | 5163 act = purple_menu_action_new(_("Re-request Authorization"), |
5178 PURPLE_CALLBACK(oscar_auth_sendrequest_menu), | 5164 PURPLE_CALLBACK(oscar_auth_sendrequest_menu), |
5179 NULL, NULL); | 5165 NULL, NULL); |
5180 menu = g_list_prepend(menu, act); | 5166 menu = g_list_prepend(menu, act); |
5321 const gchar *bname, *gname; | 5307 const gchar *bname, *gname; |
5322 | 5308 |
5323 buddy = cur->data; | 5309 buddy = cur->data; |
5324 bname = purple_buddy_get_name(buddy); | 5310 bname = purple_buddy_get_name(buddy); |
5325 gname = purple_group_get_name(purple_buddy_get_group(buddy)); | 5311 gname = purple_group_get_name(purple_buddy_get_group(buddy)); |
5326 if (aim_ssi_waitingforauth(od->ssi.local, gname, bname)) { | 5312 if (aim_ssi_waitingforauth(&od->ssi.local, gname, bname)) { |
5327 filtered_buddies = g_slist_prepend(filtered_buddies, buddy); | 5313 filtered_buddies = g_slist_prepend(filtered_buddies, buddy); |
5328 } | 5314 } |
5329 } | 5315 } |
5330 | 5316 |
5331 g_slist_free(buddies); | 5317 g_slist_free(buddies); |