diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-07-27 21:18:33 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-07-27 21:18:33 +0200 | 
| commit | a36b030d747a39fed8224e6350d56d55b2aec4e2 (patch) | |
| tree | 4265236a80a2801081c53e99d195b71ec32cbd1d /protocols/yahoo/yahoo.c | |
| parent | 2811940d678bd9340055e08a0462c21e710d5714 (diff) | |
The Yahoo! module now properly sets away states instead of away messages.
(So other BitlBees can read your Yahoo! away states better and others can
see the proper icons again.)
Diffstat (limited to 'protocols/yahoo/yahoo.c')
| -rw-r--r-- | protocols/yahoo/yahoo.c | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 79c0febb..28735432 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -191,13 +191,18 @@ static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg  	gc->away = NULL; -	if( msg ) +	if( state && msg && g_strcasecmp( state, msg ) != 0 )  	{  		yd->current_status = YAHOO_STATUS_CUSTOM;  		gc->away = "";  	} -	if( state ) +	else if( state )  	{ +		/* Set msg to NULL since (if it isn't NULL already) it's equal +		   to state. msg must be empty if we want to use an existing +		   away state. */ +		msg = NULL; +		  		gc->away = "";  		if( g_strcasecmp( state, "Available" ) == 0 )  		{ @@ -234,10 +239,7 @@ static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg  	else  		yd->current_status = YAHOO_STATUS_AVAILABLE; -	if( yd->current_status == YAHOO_STATUS_INVISIBLE ) -		yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL ); -	else -		yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); +	yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );  }  static GList *byahoo_away_states( struct gaim_connection *gc ) | 
