diff libpurple/protocols/irc/irc.c @ 24509:125cac3e24ee

The Add Buddy dialog should not blindly create a duplicate buddy in a group Fix up a subset of the prpls add_buddy functions to properly handle this situation. * Everything that comes before oscar alphabetically should work properly (except Gadu-Gadu and MSN, which need testing/another set of eyes)
author Paul Aurich <paul@darkrain42.org>
date Sat, 29 Nov 2008 18:46:49 +0000
parents c204239bef48
children 9ea3474065dc
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c	Sat Nov 29 18:20:58 2008 +0000
+++ b/libpurple/protocols/irc/irc.c	Sat Nov 29 18:46:49 2008 +0000
@@ -565,7 +565,7 @@
 	struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
 	struct irc_buddy *ib = g_new0(struct irc_buddy, 1);
 	ib->name = g_strdup(buddy->name);
-	g_hash_table_insert(irc->buddies, ib->name, ib);
+	g_hash_table_replace(irc->buddies, ib->name, ib);
 
 	/* if the timer isn't set, this is during signon, so we don't want to flood
 	 * ourself off with ISON's, so we don't, but after that we want to know when