Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 13875:eb20e674ccf2
[gaim-migrate @ 16349]
Three changes:
1. When you try to sign on with an oscar screen name that
is not valid ("123abc" for example), the PRPL will set
gc->wants_to_die to TRUE so that the account will not
be auto-reconnected.
2. When we get an AIM userinfo packet about someone in
our buddy list, if the person has some kind of screen
name formatting set ("Mark Doliner" instead of
"markdoliner") then we set the buddies server_nick to
that formatted name.
3. Add a "Get AIM Info" to the context menu for ICQ
buddies who are in the buddy list of an ICQ user.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Jun 2006 09:03:54 +0000 |
parents | 77a50840d9e2 |
children | cab785a7c766 |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Mon Jun 26 04:21:04 2006 +0000 +++ b/src/protocols/oscar/oscar.c Mon Jun 26 09:03:54 2006 +0000 @@ -1225,6 +1225,7 @@ if (!aim_snvalid(gaim_account_get_username(account))) { gchar *buf; buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid. Screen names must either start with a letter and contain only letters, numbers and spaces, or contain only numbers."), gaim_account_get_username(account)); + gc->wants_to_die = TRUE; gaim_connection_error(gc, buf); g_free(buf); } @@ -2915,6 +2916,11 @@ if (b == NULL) return 1; + if (strcmp(gaim_buddy_get_name(b), userinfo->sn)) + serv_got_alias(gc, gaim_buddy_get_name(b), userinfo->sn); + else + serv_got_alias(gc, gaim_buddy_get_name(b), NULL); + presence = gaim_buddy_get_presence(b); status = gaim_presence_get_active_status(presence); @@ -4227,6 +4233,11 @@ return ret; } +/* + * As of 26 June 2006, ICQ users can request AIM info from + * everyone, and can request ICQ info from ICQ users, and + * AIM users can only request AIM info. + */ static void oscar_get_info(GaimConnection *gc, const char *name) { OscarData *od = (OscarData *)gc->proto_data; @@ -5760,6 +5771,20 @@ g_free(buf); } +static void +oscar_get_aim_info_cb(GaimBlistNode *node, gpointer ignore) +{ + GaimBuddy *buddy; + GaimConnection *gc; + + g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + + buddy = (GaimBuddy *)node; + gc = gaim_account_get_connection(buddy->account); + + aim_locate_getinfoshort(gc->proto_data, gaim_buddy_get_name(buddy), 0x00000003); +} + static GList *oscar_buddy_menu(GaimBuddy *buddy) { GaimConnection *gc; @@ -5773,6 +5798,14 @@ userinfo = aim_locate_finduserinfo(od, buddy->name); m = NULL; + if (od->icq && aim_sn_is_icq(gaim_buddy_get_name(buddy))) + { + act = gaim_menu_action_new(_("Get AIM Info"), + GAIM_CALLBACK(oscar_get_aim_info_cb), + NULL, NULL); + m = g_list_append(m, act); + } + act = gaim_menu_action_new(_("Edit Buddy Comment"), GAIM_CALLBACK(oscar_buddycb_edit_comment), NULL, NULL);