aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/yahoo/yahoo.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-04-18 23:03:43 -0700
committerWilmer van der Gaast <wilmer@gaast.net>2007-04-18 23:03:43 -0700
commitf0cb961652cbd639e89dcd88a86f20a2414146c4 (patch)
tree7bddf3e5f8cd1402639b134773adcb4d04c375dc /protocols/yahoo/yahoo.c
parent33dc2618520409c0d52efff335fe299c26f6dd42 (diff)
More API changes: buddy list management. imcb_add_buddy() is now a *real*
callback, it's only called from inside IM-modules. This makes sure a buddy only gets added to the BitlBee structures if the add was successful. This gets rid of the weirdness described in #55. Unfortunately for now this change breaks A) automatic renaming of ICQ contacts (if there are names stored in the contact list) B) add -tmp.
Diffstat (limited to 'protocols/yahoo/yahoo.c')
-rw-r--r--protocols/yahoo/yahoo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c
index 191a197c..c3d57a94 100644
--- a/protocols/yahoo/yahoo.c
+++ b/protocols/yahoo/yahoo.c
@@ -531,7 +531,9 @@ void ext_yahoo_got_buddies( int id, YList *buds )
yd->buddygroups = g_slist_append( yd->buddygroups, bg );
}
- add_buddy( ic, b->group, b->id, b->real_name );
+ imcb_add_buddy( ic, b->id, b->group );
+ imcb_rename_buddy( ic, b->id, b->real_name );
+
bl = bl->next;
}
}
@@ -903,6 +905,9 @@ void ext_yahoo_chat_yahooerror( int id, const char *me )
void ext_yahoo_contact_added( int id, const char *myid, const char *who, const char *msg )
{
+ /* Groups schmoups. If I want to handle groups properly I can get the
+ buddy data from some internal libyahoo2 structure. */
+ imcb_add_buddy( byahoo_get_ic_by_id( id ), (char*) who, NULL );
}
void ext_yahoo_rejected( int id, const char *who, const char *msg )