Mercurial > pidgin.yaz
changeset 4251:f68c4203d001
[gaim-migrate @ 4501]
This will cause gaim to ask you at login if you want to re-request
authorization for people that haven't authorized you. I was
"mistaken" earlier when I said it would do this. Also, I'll
probably end up shuffling this code around a little bit, since
there's some repetition there, now.
I think this is a decent alternative to having an "Awaiting
Authorization" group. I'd like to do something like that, but
it'll take time. And a right-click menu with a the option to
re-request authorization is probably possible. I'll try to do that
tonight.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 08 Jan 2003 17:49:35 +0000 |
parents | 3b884e35e6b5 |
children | 280ed2b617be |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 29 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Wed Jan 08 08:22:16 2003 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jan 08 17:49:35 2003 +0000 @@ -4097,13 +4097,36 @@ for (curitem=sess->ssi.local; curitem; curitem=curitem->next) { switch (curitem->type) { case 0x0000: { /* Buddy */ - if ((curitem->name) && (!find_buddy(gc, curitem->name))) { + if (curitem->name) { char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, curitem->name); - char *alias = aim_ssi_getalias(sess->ssi.local, gname, curitem->name); - debug_printf("ssi: adding buddy %s to group %s to local list\n", curitem->name, gname); - add_buddy(gc, (gname ? gname : "orphans"), curitem->name, alias); - free(alias); - tmp++; + if (!find_buddy(gc, curitem->name)) { + char *alias = aim_ssi_getalias(sess->ssi.local, gname, curitem->name); + debug_printf("ssi: adding buddy %s to group %s to local list\n", curitem->name, gname); + add_buddy(gc, (gname ? gname : "orphans"), curitem->name, alias); + free(alias); + tmp++; + } + if (curitem->name && gname && aim_ssi_waitingforauth(sess->ssi.local, gname, curitem->name)) { + struct name_data *data = g_new(struct name_data, 1); + gchar *dialog_msg, *nombre; + struct buddy *buddy; + + buddy = find_buddy(gc, curitem->name); + if (buddy && (get_buddy_alias_only(buddy))) + nombre = g_strdup_printf("%s (%s)", curitem->name, get_buddy_alias_only(buddy)); + else + nombre = g_strdup(curitem->name); + + dialog_msg = g_strdup_printf(_("The user %s requires authorization before being added to a buddy list. Do you want to send an authorization request?"), nombre); + data->gc = gc; + data->name = g_strdup(curitem->name); + data->nick = NULL; + do_ask_dialog(_("Request Authorization"), dialog_msg, data, _("Request Authorization"), gaim_auth_request, _("Cancel"), gaim_auth_dontrequest, my_protocol->plug ? my_protocol->plug->handle : NULL, FALSE); + + g_free(dialog_msg); + g_free(nombre); + } + } } break;