Mercurial > pidgin.yaz
changeset 7264:deab8d8bbb4e
[gaim-migrate @ 7841]
it occured to me that this might happen
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 14 Oct 2003 17:12:17 +0000 |
parents | 412163e23000 |
children | d565594c1bae |
files | src/protocols/jabber/jabber.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c Tue Oct 14 17:12:01 2003 +0000 +++ b/src/protocols/jabber/jabber.c Tue Oct 14 17:12:17 2003 +0000 @@ -447,6 +447,7 @@ GList *groups, *flds; xmlnode *query, *y; JabberIq *iq; + char *username; iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:register"); query = xmlnode_get_child(iq->node, "query"); @@ -491,9 +492,19 @@ continue; } xmlnode_insert_data(y, value, -1); + if(!strcmp(id, "username")) { + if(js->user->node) + g_free(js->user->node); + js->user->node = g_strdup(value); + } } } + username = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain, + js->user->resource); + gaim_account_set_username(js->gc->account, username); + g_free(username); + jabber_iq_set_callback(iq, jabber_registration_result_cb); jabber_iq_send(iq);