# HG changeset patch # User Christian Hammond # Date 1044151515 0 # Node ID f3afcc4dd133a5402ff43e06ca9ca3798e11c8d2 # Parent 577e6d2683405d6ce3a7e795f09f267bd3b34c82 [gaim-migrate @ 4781] Fixed the problem where a user changing nicks wouldn't remove the user from the list. This screwed up all kinds of things for LSchiere. committer: Tailor Script diff -r 577e6d268340 -r f3afcc4dd133 src/conversation.c --- a/src/conversation.c Sat Feb 01 21:52:38 2003 +0000 +++ b/src/conversation.c Sun Feb 02 02:05:15 2003 +0000 @@ -1915,6 +1915,7 @@ struct gaim_conversation *conv; struct gaim_conversation_ui_ops *ops; char tmp[BUF_LONG]; + GList *names; if (chat == NULL || old_user == NULL || new_user == NULL) return; @@ -1929,8 +1930,16 @@ if (ops != NULL && ops->chat_rename_user != NULL) ops->chat_rename_user(conv, old_user, new_user); - gaim_chat_set_users(chat, g_list_remove(gaim_chat_get_users(chat), - old_user)); + for (names = gaim_chat_get_users(chat); + names != NULL; + names = names->next) { + + if (!g_strcasecmp((char *)names->data, old_user)) { + gaim_chat_set_users(chat, + g_list_remove(gaim_chat_get_users(chat), names->data)); + break; + } + } if (gaim_chat_is_user_ignored(chat, old_user)) { gaim_chat_unignore(chat, old_user);