Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
9284:fe0291162312 | 9285:7a8aa87164ae |
---|---|
353 | 353 |
354 args[0] = msg; | 354 args[0] = msg; |
355 irc_cmd_away(irc, "away", NULL, args); | 355 irc_cmd_away(irc, "away", NULL, args); |
356 } | 356 } |
357 | 357 |
358 static void irc_add_buddy(GaimConnection *gc, const char *who, GaimGroup *group) | 358 static void irc_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) |
359 { | 359 { |
360 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; | 360 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; |
361 struct irc_buddy *ib = g_new0(struct irc_buddy, 1); | 361 struct irc_buddy *ib = g_new0(struct irc_buddy, 1); |
362 ib->name = g_strdup(who); | 362 ib->name = g_strdup(buddy->name); |
363 g_hash_table_insert(irc->buddies, ib->name, ib); | 363 g_hash_table_insert(irc->buddies, ib->name, ib); |
364 | 364 |
365 irc_blist_timeout(irc); | 365 irc_blist_timeout(irc); |
366 } | 366 } |
367 | 367 |
368 static void irc_remove_buddy(GaimConnection *gc, const char *who, const char *group) | 368 static void irc_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) |
369 { | 369 { |
370 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; | 370 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; |
371 g_hash_table_remove(irc->buddies, who); | 371 g_hash_table_remove(irc->buddies, buddy->name); |
372 } | 372 } |
373 | |
374 | 373 |
375 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond) | 374 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond) |
376 { | 375 { |
377 GaimConnection *gc = data; | 376 GaimConnection *gc = data; |
378 struct irc_conn *irc = gc->proto_data; | 377 struct irc_conn *irc = gc->proto_data; |