Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
8157:657b5acaec48 | 8158:e283be34aadf |
---|---|
305 | 305 |
306 if(!chat->conv) { | 306 if(!chat->conv) { |
307 chat->id = i++; | 307 chat->id = i++; |
308 chat->muc = muc; | 308 chat->muc = muc; |
309 chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid); | 309 chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid); |
310 gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), jid->resource); | |
310 } | 311 } |
311 | 312 |
312 if(type && !strcmp(type, "unavailable")) { | 313 if(type && !strcmp(type, "unavailable")) { |
313 gboolean nick_change = FALSE; | 314 gboolean nick_change = FALSE; |
314 | 315 |
329 continue; | 330 continue; |
330 if(!(nick = xmlnode_get_attrib(item, "nick"))) | 331 if(!(nick = xmlnode_get_attrib(item, "nick"))) |
331 continue; | 332 continue; |
332 nick_change = TRUE; | 333 nick_change = TRUE; |
333 gaim_conv_chat_rename_user(GAIM_CONV_CHAT(chat->conv), jid->resource, nick); | 334 gaim_conv_chat_rename_user(GAIM_CONV_CHAT(chat->conv), jid->resource, nick); |
334 if(!g_utf8_collate(jid->resource, chat->nick)) { | |
335 g_free(chat->nick); | |
336 chat->nick = g_strdup(nick); | |
337 } | |
338 break; | 335 break; |
339 } | 336 } |
340 } | 337 } |
341 if(!nick_change) { | 338 if(!nick_change) { |
342 if(!strcmp(jid->resource, chat->nick)) { | 339 if(!g_utf8_collate(jid->resource, gaim_conv_chat_get_nick(GAIM_CONV_CHAT(chat->conv)))) { |
343 serv_got_chat_left(js->gc, chat->id); | 340 serv_got_chat_left(js->gc, chat->id); |
344 jabber_chat_destroy(chat); | 341 jabber_chat_destroy(chat); |
345 } else { | 342 } else { |
346 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(chat->conv), jid->resource, | 343 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(chat->conv), jid->resource, |
347 status); | 344 status); |