diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-15 11:34:02 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-15 11:34:02 +0200 | 
| commit | 93b7bd4373c7c020f37fb96b547b5eda99daf547 (patch) | |
| tree | deda2d1081455b832d6f3354d927544fde39e1c8 /protocols/yahoo/yahoo.c | |
| parent | 7e83adca0e875710627588bf28ddb60fb61bd43b (diff) | |
| parent | e97827bee83d3a0663aa284e72a4f6c84b4b4dfe (diff) | |
Merging from devel and storage-xml.
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 23c6f813..6f286196 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 ) | 
