diff options
Diffstat (limited to 'protocols/yahoo')
| -rw-r--r-- | protocols/yahoo/yahoo.c | 20 | 
1 files changed, 9 insertions, 11 deletions
| diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 922ac17b..68bc6f69 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -152,7 +152,7 @@ static void byahoo_logout( struct im_connection *ic )  	GSList *l;  	while( ic->groupchats ) -		imcb_chat_free( ic->groupchats ); +		imcb_chat_free( ic->groupchats->data );  	for( l = yd->buddygroups; l; l = l->next )  	{ @@ -790,10 +790,14 @@ static void byahoo_accept_conf( void *data )  {  	struct byahoo_conf_invitation *inv = data;  	struct groupchat *b; +	GSList *l; -	for( b = inv->ic->groupchats; b; b = b->next ) +	for( l = inv->ic->groupchats; l; l = l->next ) +	{ +		b = l->data;  		if( b == inv->c )  			break; +	}  	if( b != NULL )  	{ @@ -859,9 +863,7 @@ void ext_yahoo_conf_userdecline( int id, const char *ignored, const char *who, c  void ext_yahoo_conf_userjoin( int id, const char *ignored, const char *who, const char *room )  {  	struct im_connection *ic = byahoo_get_ic_by_id( id ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_add_buddy( c, (char*) who ); @@ -871,9 +873,7 @@ void ext_yahoo_conf_userleave( int id, const char *ignored, const char *who, con  {  	struct im_connection *ic = byahoo_get_ic_by_id( id ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_remove_buddy( c, (char*) who, "" ); @@ -883,9 +883,7 @@ void ext_yahoo_conf_message( int id, const char *ignored, const char *who, const  {  	struct im_connection *ic = byahoo_get_ic_by_id( id );  	char *m = byahoo_strip( msg ); -	struct groupchat *c; -	 -	for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next ); +	struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );  	if( c )  		imcb_chat_msg( c, (char*) who, (char*) m, 0, 0 ); | 
