diff options
Diffstat (limited to 'protocols/yahoo/yahoo.c')
-rw-r--r-- | protocols/yahoo/yahoo.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 52db9007..424a0ad1 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -122,13 +122,13 @@ static char *byahoo_strip( char *in ) static void byahoo_login( account_t *acc ) { - struct im_connection *ic = new_gaim_conn( acc ); + struct im_connection *ic = imc_new( acc ); struct byahoo_data *yd = ic->proto_data = g_new0( struct byahoo_data, 1 ); yd->logged_in = FALSE; yd->current_status = YAHOO_STATUS_AVAILABLE; - set_login_progress( ic, 1, "Connecting" ); + imc_log( ic, "Connecting" ); yd->y2_id = yahoo_init( acc->user, acc->pass ); yahoo_login( yd->y2_id, yd->current_status ); } @@ -162,7 +162,7 @@ static void byahoo_logout( struct im_connection *ic ) static void byahoo_get_info(struct im_connection *ic, char *who) { /* Just make an URL and let the user fetch the info */ - serv_got_crap(ic, "%s\n%s: %s%s", _("User Info"), + imc_log(ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), yahoo_get_profile_url(), who); } @@ -510,7 +510,7 @@ void ext_yahoo_login_response( int id, int succ, char *url ) if( succ == YAHOO_LOGIN_OK ) { - account_online( ic ); + imc_connected( ic ); yd->logged_in = TRUE; } @@ -549,13 +549,13 @@ void ext_yahoo_login_response( int id, int succ, char *url ) } if( yd->logged_in ) - hide_login_progress_error( ic, s ); + imc_error( ic, s ); else - hide_login_progress( ic, s ); + imc_error( ic, s ); g_free( s ); - signoff( ic ); + imc_logout( ic ); } } @@ -618,7 +618,7 @@ void ext_yahoo_got_file( int id, char *who, char *url, long expires, char *msg, { struct im_connection *ic = byahoo_get_ic_by_id( id ); - serv_got_crap( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who ); + imc_log( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who ); } void ext_yahoo_typing_notify( int id, char *who, int stat ) @@ -638,29 +638,24 @@ void ext_yahoo_system_message( int id, char *msg ) { struct im_connection *ic = byahoo_get_ic_by_id( id ); - serv_got_crap( ic, "Yahoo! system message: %s", msg ); + imc_log( ic, "Yahoo! system message: %s", msg ); } void ext_yahoo_webcam_invite( int id, char *from ) { struct im_connection *ic = byahoo_get_ic_by_id( id ); - serv_got_crap( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from ); + imc_log( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from ); } void ext_yahoo_error( int id, char *err, int fatal ) { struct im_connection *ic = byahoo_get_ic_by_id( id ); + imc_error( ic, "%s", err ); + if( fatal ) - { - hide_login_progress_error( ic, err ); - signoff( ic ); - } - else - { - do_error_dialog( ic, err, "Yahoo! error" ); - } + imc_logout( ic ); } /* TODO: Clear up the mess of inp and d structures */ @@ -828,7 +823,7 @@ void ext_yahoo_conf_userdecline( int id, char *who, char *room, char *msg ) { struct im_connection *ic = byahoo_get_ic_by_id( id ); - serv_got_crap( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg ); + imc_log( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg ); } void ext_yahoo_conf_userjoin( int id, char *who, char *room ) @@ -911,9 +906,9 @@ void ext_yahoo_mail_notify( int id, char *from, char *subj, int cnt ) struct im_connection *ic = byahoo_get_ic_by_id( id ); if( from && subj ) - serv_got_crap( ic, "Received e-mail message from %s with subject `%s'", from, subj ); + imc_log( ic, "Received e-mail message from %s with subject `%s'", from, subj ); else if( cnt > 0 ) - serv_got_crap( ic, "Received %d new e-mails", cnt ); + imc_log( ic, "Received %d new e-mails", cnt ); } void ext_yahoo_webcam_invite_reply( int id, char *from, int accept ) |