Mercurial > pidgin
diff src/protocols/jabber/presence.c @ 8158:e283be34aadf
[gaim-migrate @ 8870]
this hasn't crahed on me yet, and lets chats know what your nick is on a per-room basis,
since Jabber is cool enough to let you be different nicks in different rooms
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 21 Jan 2004 04:55:34 +0000 |
parents | 8f4ce853e685 |
children | 3e1762ad0f98 |
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c Wed Jan 21 04:51:29 2004 +0000 +++ b/src/protocols/jabber/presence.c Wed Jan 21 04:55:34 2004 +0000 @@ -307,6 +307,7 @@ chat->id = i++; chat->muc = muc; chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid); + gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), jid->resource); } if(type && !strcmp(type, "unavailable")) { @@ -331,15 +332,11 @@ continue; nick_change = TRUE; gaim_conv_chat_rename_user(GAIM_CONV_CHAT(chat->conv), jid->resource, nick); - if(!g_utf8_collate(jid->resource, chat->nick)) { - g_free(chat->nick); - chat->nick = g_strdup(nick); - } break; } } if(!nick_change) { - if(!strcmp(jid->resource, chat->nick)) { + if(!g_utf8_collate(jid->resource, gaim_conv_chat_get_nick(GAIM_CONV_CHAT(chat->conv)))) { serv_got_chat_left(js->gc, chat->id); jabber_chat_destroy(chat); } else {