diff -r 8606cb4e94f5 -r 6c6870d15155 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Fri Aug 29 13:59:59 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.c Fri Aug 29 14:01:14 2008 +0000 @@ -1251,7 +1251,6 @@ text = xmlnode_get_data(child); if(text && !strcmp(child->name, "FN")) { - /* If we havne't found a name yet, use this one as the serverside name */ if (!serverside_alias) serverside_alias = g_strdup(text); @@ -1275,11 +1274,14 @@ g_free(text2); } } else if(text && !strcmp(child->name, "NICKNAME")) { - /* Prefer the Nickcname to the Full Name as the serverside alias */ - g_free(serverside_alias); - serverside_alias = g_strdup(text); - - purple_notify_user_info_add_pair(user_info, _("Nickname"), text); + /* Prefer the Nickcname to the Full Name as the serverside alias if it's not just part of the jid. + * Ignore it if it's part of the jid. */ + if (strstr(bare_jid, text) == NULL) { + g_free(serverside_alias); + serverside_alias = g_strdup(text); + + purple_notify_user_info_add_pair(user_info, _("Nickname"), text); + } } else if(text && !strcmp(child->name, "BDAY")) { purple_notify_user_info_add_pair(user_info, _("Birthday"), text); } else if(!strcmp(child->name, "ADR")) {