Mercurial > pidgin
comparison src/protocols/jabber/chat.c @ 7972:ac01b7d67ff9
[gaim-migrate @ 8649]
yay, /nick for jabber
i'll be really happy if marv finishes /command support for the core soon ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 02 Jan 2004 07:34:26 +0000 |
parents | 6fca0d9cc98b |
children | 415df6fa0395 |
comparison
equal
deleted
inserted
replaced
7971:6fca0d9cc98b | 7972:ac01b7d67ff9 |
---|---|
569 | 569 |
570 jabber_chat_change_topic(chat, topic); | 570 jabber_chat_change_topic(chat, topic); |
571 } | 571 } |
572 | 572 |
573 | 573 |
574 void jabber_chat_change_nick(JabberChat *chat, const char *nick) | |
575 { | |
576 xmlnode *presence; | |
577 char *full_jid; | |
578 | |
579 if(!chat->muc) { | |
580 gaim_conv_chat_write(GAIM_CONV_CHAT(chat->conv), "", | |
581 _("Nick changing not supported in non-MUC chatrooms"), | |
582 GAIM_MESSAGE_SYSTEM, time(NULL)); | |
583 return; | |
584 } | |
585 | |
586 presence = jabber_presence_create(chat->js->gc->away_state, chat->js->gc->away); | |
587 full_jid = g_strdup_printf("%s@%s/%s", chat->room, chat->server, nick); | |
588 xmlnode_set_attrib(presence, "to", full_jid); | |
589 g_free(full_jid); | |
590 | |
591 jabber_send(chat->js, presence); | |
592 xmlnode_free(presence); | |
593 } | |
594 | |
595 |