Mercurial > pidgin
diff src/protocols/jabber/buddy.c @ 7955:119a22025818
[gaim-migrate @ 8630]
fun jabber stuff, which isn't done yet. mostly harmless, and committing this now makes the next
commit that much easier for a lazy person such as myself to type.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 29 Dec 2003 08:59:22 +0000 |
parents | 72727edb37ef |
children | 8f4ce853e685 |
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c Mon Dec 29 07:19:55 2003 +0000 +++ b/src/protocols/jabber/buddy.c Mon Dec 29 08:59:22 2003 +0000 @@ -530,8 +530,10 @@ JabberBuddyResource *jbr; GString *info_text; char *resource_name; + char *bare_jid; char *title; xmlnode *vcard; + GaimBuddy *b; if(!from) return; @@ -539,6 +541,9 @@ /* XXX: make this handle handle errors */ resource_name = jabber_get_resource(from); + bare_jid = jabber_get_bare_jid(from); + + b = gaim_find_buddy(js->gc->account, bare_jid); jb = jabber_buddy_find(js, from, TRUE); info_text = g_string_new(""); @@ -580,6 +585,7 @@ } g_free(resource_name); + g_free(bare_jid); if((vcard = xmlnode_get_child(packet, "vCard"))) { xmlnode *child; @@ -621,6 +627,10 @@ } } else if(text && !strcmp(child->name, "NICKNAME")) { serv_got_alias(js->gc, from, text); + if(b) { + gaim_blist_node_set_string((GaimBlistNode*)b, "servernick", text); + gaim_blist_save(); + } g_string_append_printf(info_text, "<b>%s:</b> %s<br/>\n", _("Nickname"), text); } else if(text && !strcmp(child->name, "BDAY")) {