diff src/protocols/irc/irc.c @ 9285:7a8aa87164ae

[gaim-migrate @ 10088] Ok I'm done. This started out as shx's patch to make add/remove buddy/buddies take GaimBuddy and GaimGroup's in various places. I think his diff was like 2000 lines and mine is like 5000. I tried to clean up blist.c a bit and make it more uniform. There are some more g_return_if_fail() checks. Removed some code that was deprecated--it's probably been long enough. Removed some #include <multi.h>'s. Make blist.xml saving happen on a timer, like prefs.xml and accounts.xml. Sorry if this doesn't merge cleanly with whatever you're doing. People should really test this a lot. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 15 Jun 2004 02:37:27 +0000
parents f4f210e47b60
children b3bda982996b
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Tue Jun 15 01:17:16 2004 +0000
+++ b/src/protocols/irc/irc.c	Tue Jun 15 02:37:27 2004 +0000
@@ -355,23 +355,22 @@
 	irc_cmd_away(irc, "away", NULL, args);
 }
 
-static void irc_add_buddy(GaimConnection *gc, const char *who, GaimGroup *group)
+static void irc_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)
 {
 	struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
 	struct irc_buddy *ib = g_new0(struct irc_buddy, 1);
-	ib->name = g_strdup(who);
+	ib->name = g_strdup(buddy->name);
 	g_hash_table_insert(irc->buddies, ib->name, ib);
 
 	irc_blist_timeout(irc);
 }
 
-static void irc_remove_buddy(GaimConnection *gc, const char *who, const char *group)
+static void irc_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)
 {
 	struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
-	g_hash_table_remove(irc->buddies, who);
+	g_hash_table_remove(irc->buddies, buddy->name);
 }
 
-
 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond)
 {
 	GaimConnection *gc = data;