# HG changeset patch # User ivan.komarov@soc.pidgin.im # Date 1288203974 0 # Node ID bbf7096ae66ceff6e58e26e2690a90a7103b8d30 # Parent e7365705f151547c791c74440b993c7d54254749# Parent a1964c506f290f7e170b3769346214dff8f83756 merge of '598ef461d4de936afef7298e55152cc7ecaa9b70' and 'b4c65c273f2934560d9e643a124b31ac2d2328f2' diff -r e7365705f151 -r bbf7096ae66c libpurple/protocols/oscar/family_icq.c --- a/libpurple/protocols/oscar/family_icq.c Wed Oct 27 13:56:25 2010 +0000 +++ b/libpurple/protocols/oscar/family_icq.c Wed Oct 27 18:26:14 2010 +0000 @@ -408,27 +408,27 @@ return 0; } -static int +static void gotalias(OscarData *od, struct aim_icq_info *info) { PurpleConnection *gc = od->gc; PurpleAccount *account = purple_connection_get_account(gc); - gchar who[16], *utf8; PurpleBuddy *b; + gchar *utf8 = oscar_utf8_try_convert(account, od, info->nick); - if (info->nick[0] && (utf8 = oscar_utf8_try_convert(account, od, info->nick))) { - if (info->for_auth_request) { - oscar_auth_recvrequest(gc, g_strdup_printf("%u", info->uin), utf8, info->auth_request_reason); - } else { + if (info->for_auth_request) { + oscar_auth_recvrequest(gc, g_strdup_printf("%u", info->uin), utf8, info->auth_request_reason); + } else { + if (utf8 && *utf8) { + gchar who[16]; g_snprintf(who, sizeof(who), "%u", info->uin); serv_got_alias(gc, who, utf8); if ((b = purple_find_buddy(account, who))) { purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8); } - g_free(utf8); } + g_free(utf8); } - return 1; } /** diff -r e7365705f151 -r bbf7096ae66c pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Wed Oct 27 13:56:25 2010 +0000 +++ b/pidgin/gtkaccount.c Wed Oct 27 18:26:14 2010 +0000 @@ -2468,6 +2468,7 @@ GtkWidget *alert; GdkPixbuf *prpl_icon; struct auth_request *aa; + gboolean have_valid_alias = alias && *alias; gc = purple_account_get_connection(account); if (message != NULL && *message == '\0') @@ -2475,9 +2476,9 @@ buffer = g_strdup_printf(_("%s%s%s%s wants to add you (%s) to his or her buddy list%s%s"), remote_user, - (alias != NULL ? " (" : ""), - (alias != NULL ? alias : ""), - (alias != NULL ? ")" : ""), + (have_valid_alias ? " (" : ""), + (have_valid_alias ? alias : ""), + (have_valid_alias ? ")" : ""), (id != NULL ? id : (purple_connection_get_display_name(gc) != NULL