Changes in protocols/yahoo/yahoo.c [5b52a48:a36b030]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r5b52a48 ra36b030 121 121 } 122 122 123 static void byahoo_login( account_t *acc)124 { 125 struct gaim_connection *gc = new_gaim_conn( acc);123 static void byahoo_login( struct aim_user *user ) 124 { 125 struct gaim_connection *gc = new_gaim_conn( user ); 126 126 struct byahoo_data *yd = gc->proto_data = g_new0( struct byahoo_data, 1 ); 127 127 … … 130 130 131 131 set_login_progress( gc, 1, "Connecting" ); 132 yd->y2_id = yahoo_init( acc->user, acc->pass);132 yd->y2_id = yahoo_init( user->username, user->password ); 133 133 yahoo_login( yd->y2_id, yd->current_status ); 134 134 } … … 192 192 gc->away = NULL; 193 193 194 if( msg)194 if( state && msg && g_strcasecmp( state, msg ) != 0 ) 195 195 { 196 196 yd->current_status = YAHOO_STATUS_CUSTOM; 197 197 gc->away = ""; 198 198 } 199 if( state ) 200 { 199 else if( state ) 200 { 201 /* Set msg to NULL since (if it isn't NULL already) it's equal 202 to state. msg must be empty if we want to use an existing 203 away state. */ 204 msg = NULL; 205 201 206 gc->away = ""; 202 207 if( g_strcasecmp( state, "Available" ) == 0 ) … … 235 240 yd->current_status = YAHOO_STATUS_AVAILABLE; 236 241 237 if( yd->current_status == YAHOO_STATUS_INVISIBLE ) 238 yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL ); 239 else 240 yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); 242 yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); 241 243 } 242 244 … … 409 411 ret->chat_leave = byahoo_chat_leave; 410 412 ret->chat_open = byahoo_chat_open; 411 412 ret->handle_cmp = g_strcasecmp; 413 ret->cmp_buddynames = g_strcasecmp; 413 414 414 415 register_protocol(ret); … … 426 427 yd = gc->proto_data; 427 428 428 if( strcmp( gc->acc->prpl->name, "yahoo" ) == 0&& yd->y2_id == id )429 if( !strcmp(gc->prpl->name, "yahoo") && yd->y2_id == id ) 429 430 return( gc ); 430 431 }
Note: See TracChangeset
for help on using the changeset viewer.