Mercurial > pidgin
changeset 1994:0c8073b877d2
[gaim-migrate @ 2004]
if you haven't aliased the person, use their friendly name
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 11 Jun 2001 23:17:02 +0000 |
parents | a4db3667da12 |
children | 815997c7d4f1 |
files | plugins/msn/msn.c |
diffstat | 1 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/msn/msn.c Mon Jun 11 21:11:48 2001 +0000 +++ b/plugins/msn/msn.c Mon Jun 11 23:17:02 2001 +0000 @@ -633,13 +633,18 @@ do_import(NULL, gc); md->imported = TRUE; while (md->fl) { - struct msn_buddy *b = md->fl->data; - md->fl = g_slist_remove(md->fl, b); - if (!find_buddy(gc, b->user)) - add_buddy(gc, "Buddies", b->user, b->friend); - g_free(b->user); - g_free(b->friend); - g_free(b); + struct msn_buddy *mb = md->fl->data; + struct buddy *b; + md->fl = g_slist_remove(md->fl, mb); + if (!(b = find_buddy(gc, mb->user))) + add_buddy(gc, "Buddies", mb->user, mb->friend); + else if (!g_strcasecmp(b->name, b->show)) { + g_snprintf(b->show, sizeof(b->show), "%s", mb->friend); + handle_buddy_rename(b, b->name); + } + g_free(mb->user); + g_free(mb->friend); + g_free(mb); } } } else if (!g_strncasecmp(buf, "MSG", 3)) {