Changeset be609ff for protocols/yahoo/yahoo.c
- Timestamp:
- 2010-03-12T19:10:16Z (15 years ago)
- Branches:
- master
- Children:
- dde9d571
- Parents:
- 08e5bb2 (diff), 8b6b740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r08e5bb2 rbe609ff 130 130 { 131 131 set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc ); 132 133 acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE; 132 134 } 133 135 … … 197 199 { 198 200 struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data; 199 char *away; 200 201 away = NULL; 202 203 if( state && msg && g_strcasecmp( state, msg ) != 0 ) 204 { 205 yd->current_status = YAHOO_STATUS_CUSTOM; 206 away = ""; 207 } 208 else if( state ) 209 { 210 /* Set msg to NULL since (if it isn't NULL already) it's equal 211 to state. msg must be empty if we want to use an existing 212 away state. */ 213 msg = NULL; 214 215 away = ""; 216 if( g_strcasecmp( state, "Available" ) == 0 ) 217 { 218 yd->current_status = YAHOO_STATUS_AVAILABLE; 219 away = NULL; 220 } 221 else if( g_strcasecmp( state, "Be Right Back" ) == 0 ) 201 202 if( state && msg == NULL ) 203 { 204 /* Use these states only if msg doesn't contain additional 205 info since away messages are only supported with CUSTOM. */ 206 if( g_strcasecmp( state, "Be Right Back" ) == 0 ) 222 207 yd->current_status = YAHOO_STATUS_BRB; 223 208 else if( g_strcasecmp( state, "Busy" ) == 0 ) … … 239 224 else if( g_strcasecmp( state, "Invisible" ) == 0 ) 240 225 yd->current_status = YAHOO_STATUS_INVISIBLE; 241 else if( g_strcasecmp( state, GAIM_AWAY_CUSTOM ) == 0 ) 242 { 243 yd->current_status = YAHOO_STATUS_AVAILABLE; 244 245 away = NULL; 246 } 247 } 226 else 227 yd->current_status = YAHOO_STATUS_CUSTOM; 228 } 229 else if( state ) 230 yd->current_status = YAHOO_STATUS_CUSTOM; 248 231 else 249 232 yd->current_status = YAHOO_STATUS_AVAILABLE; 250 233 251 yahoo_set_away( yd->y2_id, yd->current_status, msg, away != NULL? 2 : 0 );234 yahoo_set_away( yd->y2_id, yd->current_status, msg, state ? 2 : 0 ); 252 235 } 253 236 … … 258 241 if( m == NULL ) 259 242 { 260 m = g_list_append( m, "Available" );261 243 m = g_list_append( m, "Be Right Back" ); 262 244 m = g_list_append( m, "Busy" ); … … 269 251 m = g_list_append( m, "Stepped Out" ); 270 252 m = g_list_append( m, "Invisible" ); 271 m = g_list_append( m, GAIM_AWAY_CUSTOM );272 253 } 273 254
Note: See TracChangeset
for help on using the changeset viewer.