Mercurial > pidgin.yaz
comparison libpurple/protocols/irc/irc.c @ 25284:985ab911753e
updated irc to use the api rather than structs directly
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Fri, 31 Oct 2008 03:42:38 +0000 |
parents | aac5753e2528 |
children | 32ad012ef6ac |
comparison
equal
deleted
inserted
replaced
25283:4d20fa86455b | 25284:985ab911753e |
---|---|
567 | 567 |
568 static void irc_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) | 568 static void irc_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) |
569 { | 569 { |
570 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; | 570 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; |
571 struct irc_buddy *ib = g_new0(struct irc_buddy, 1); | 571 struct irc_buddy *ib = g_new0(struct irc_buddy, 1); |
572 ib->name = g_strdup(buddy->name); | 572 ib->name = g_strdup(purple_buddy_get_name(buddy)); |
573 g_hash_table_insert(irc->buddies, ib->name, ib); | 573 g_hash_table_insert(irc->buddies, ib->name, ib); |
574 | 574 |
575 /* if the timer isn't set, this is during signon, so we don't want to flood | 575 /* if the timer isn't set, this is during signon, so we don't want to flood |
576 * ourself off with ISON's, so we don't, but after that we want to know when | 576 * ourself off with ISON's, so we don't, but after that we want to know when |
577 * someone's online asap */ | 577 * someone's online asap */ |
580 } | 580 } |
581 | 581 |
582 static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) | 582 static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) |
583 { | 583 { |
584 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; | 584 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; |
585 g_hash_table_remove(irc->buddies, buddy->name); | 585 g_hash_table_remove(irc->buddies, purple_buddy_get_name(buddy)); |
586 } | 586 } |
587 | 587 |
588 static void read_input(struct irc_conn *irc, int len) | 588 static void read_input(struct irc_conn *irc, int len) |
589 { | 589 { |
590 char *cur, *end; | 590 char *cur, *end; |