changeset 4506:f3afcc4dd133

[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 <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 02 Feb 2003 02:05:15 +0000
parents 577e6d268340
children 1761c8cb8a23
files src/conversation.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);