comparison libpurple/protocols/irc/irc.c @ 27931:d8e6a2d592a4

propagate from branch 'im.pidgin.pidgin' (head 66190c21dfe7125476caca3c14725bac9db8b71b) to branch 'im.pidgin.pidgin.yaz' (head 30f1655106c7764e3f9cfc8a139784d9b0bd4459)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 03 Mar 2009 06:57:02 +0000
parents 6ecfc6b9667c 32ad012ef6ac
children 1688f7e15530
comparison
equal deleted inserted replaced
27930:25319f536d93 27931:d8e6a2d592a4
562 562
563 static void irc_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) 563 static void irc_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
564 { 564 {
565 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; 565 struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
566 struct irc_buddy *ib = g_new0(struct irc_buddy, 1); 566 struct irc_buddy *ib = g_new0(struct irc_buddy, 1);
567 ib->name = g_strdup(buddy->name); 567 ib->name = g_strdup(purple_buddy_get_name(buddy));
568 g_hash_table_insert(irc->buddies, ib->name, ib); 568 g_hash_table_insert(irc->buddies, ib->name, ib);
569 569
570 /* if the timer isn't set, this is during signon, so we don't want to flood 570 /* if the timer isn't set, this is during signon, so we don't want to flood
571 * ourself off with ISON's, so we don't, but after that we want to know when 571 * ourself off with ISON's, so we don't, but after that we want to know when
572 * someone's online asap */ 572 * someone's online asap */
575 } 575 }
576 576
577 static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) 577 static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
578 { 578 {
579 struct irc_conn *irc = (struct irc_conn *)gc->proto_data; 579 struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
580 g_hash_table_remove(irc->buddies, buddy->name); 580 g_hash_table_remove(irc->buddies, purple_buddy_get_name(buddy));
581 } 581 }
582 582
583 static void read_input(struct irc_conn *irc, int len) 583 static void read_input(struct irc_conn *irc, int len)
584 { 584 {
585 char *cur, *end; 585 char *cur, *end;