diff options
Diffstat (limited to 'protocols/msn')
-rw-r--r-- | protocols/msn/msn.c | 14 | ||||
-rw-r--r-- | protocols/msn/msn_util.c | 8 | ||||
-rw-r--r-- | protocols/msn/ns.c | 70 | ||||
-rw-r--r-- | protocols/msn/sb.c | 6 |
4 files changed, 49 insertions, 49 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index 74a41322..676a8ad7 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -38,7 +38,7 @@ static void msn_init( account_t *acc ) static void msn_login( account_t *acc ) { - struct im_connection *ic = imc_new( acc ); + struct im_connection *ic = imcb_new( acc ); struct msn_data *md = g_new0( struct msn_data, 1 ); ic->proto_data = md; @@ -46,17 +46,17 @@ static void msn_login( account_t *acc ) if( strchr( acc->user, '@' ) == NULL ) { - imc_error( ic, "Invalid account name" ); + imcb_error( ic, "Invalid account name" ); imc_logout( ic, FALSE ); return; } - imc_log( ic, "Connecting" ); + imcb_log( ic, "Connecting" ); md->fd = proxy_connect( "messenger.hotmail.com", 1863, msn_ns_connected, ic ); if( md->fd < 0 ) { - imc_error( ic, "Could not connect to server" ); + imcb_error( ic, "Could not connect to server" ); imc_logout( ic, TRUE ); return; } @@ -95,7 +95,7 @@ static void msn_logout( struct im_connection *ic ) { m = l->data; - imc_log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who ); + imcb_log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who ); g_free( m->who ); g_free( m->text ); g_free( m ); @@ -227,7 +227,7 @@ static void msn_set_my_name( struct im_connection *ic, char *info ) static void msn_get_info(struct im_connection *ic, char *who) { /* Just make an URL and let the user fetch the info */ - imc_log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who ); + imcb_log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who ); } static void msn_add_buddy( struct im_connection *ic, char *who, char *group ) @@ -372,7 +372,7 @@ static char *msn_set_display_name( set_t *set, char *value ) if( strlen( value ) > 129 ) { - imc_log( ic, "Maximum name length exceeded" ); + imcb_log( ic, "Maximum name length exceeded" ); return NULL; } diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 67e17b08..80f351a2 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -35,7 +35,7 @@ int msn_write( struct im_connection *ic, char *s, int len ) st = write( md->fd, s, len ); if( st != len ) { - imc_error( ic, "Short write() to main server" ); + imcb_error( ic, "Short write() to main server" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -45,7 +45,7 @@ int msn_write( struct im_connection *ic, char *s, int len ) int msn_logged_in( struct im_connection *ic ) { - imc_connected( ic ); + imcb_connected( ic ); return( 0 ); } @@ -94,7 +94,7 @@ static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla ) msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname ); if( find_buddy( bla->ic, bla->handle ) == NULL ) - show_got_added( bla->ic, bla->handle, NULL ); + imcb_ask_add( bla->ic, bla->handle, NULL ); g_free( bla->handle ); g_free( bla->realname ); @@ -122,7 +122,7 @@ void msn_buddy_ask( struct im_connection *ic, char *handle, char *realname ) g_snprintf( buf, sizeof( buf ), "The user %s (%s) wants to add you to his/her buddy list.", handle, realname ); - do_ask_dialog( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no ); + imcb_ask( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no ); } char *msn_findheader( char *text, char *header, int len ) diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 77bb4939..ba428d82 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -46,7 +46,7 @@ gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ) if( source == -1 ) { - imc_error( ic, "Could not connect to server" ); + imcb_error( ic, "Could not connect to server" ); imc_logout( ic, TRUE ); return FALSE; } @@ -75,7 +75,7 @@ gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ) if( msn_write( ic, s, strlen( s ) ) ) { ic->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, ic ); - imc_log( ic, "Connected to server, waiting for reply" ); + imcb_log( ic, "Connected to server, waiting for reply" ); } return FALSE; @@ -88,7 +88,7 @@ static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition c if( msn_handler( md->handler ) == -1 ) /* Don't do this on ret == 0, it's already done then. */ { - imc_error( ic, "Error while reading from server" ); + imcb_error( ic, "Error while reading from server" ); imc_logout( ic, TRUE ); return FALSE; @@ -113,7 +113,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) { if( cmd[2] && strncmp( cmd[2], "MSNP8", 5 ) != 0 ) { - imc_error( ic, "Unsupported protocol" ); + imcb_error( ic, "Unsupported protocol" ); imc_logout( ic, FALSE ); return( 0 ); } @@ -142,7 +142,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) server = strchr( cmd[3], ':' ); if( !server ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -150,7 +150,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) port = atoi( server + 1 ); server = cmd[3]; - imc_log( ic, "Transferring to other server" ); + imcb_log( ic, "Transferring to other server" ); md->fd = proxy_connect( server, port, msn_ns_connected, ic ); } @@ -161,7 +161,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) server = strchr( cmd[3], ':' ); if( !server ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -171,7 +171,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( strcmp( cmd[4], "CKI" ) != 0 ) { - imc_error( ic, "Unknown authentication method for switchboard" ); + imcb_error( ic, "Unknown authentication method for switchboard" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -203,7 +203,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) } else { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -215,7 +215,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) /* Time for some Passport black magic... */ if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) ) { - imc_error( ic, "Error while contacting Passport server" ); + imcb_error( ic, "Error while contacting Passport server" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -235,14 +235,14 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) s->value = g_strdup( cmd[4] ); } - imc_log( ic, "Authenticated, getting buddy list" ); + imcb_log( ic, "Authenticated, getting buddy list" ); g_snprintf( buf, sizeof( buf ), "SYN %d 0\r\n", ++md->trId ); return( msn_write( ic, buf, strlen( buf ) ) ); } else { - imc_error( ic, "Unknown authentication type" ); + imcb_error( ic, "Unknown authentication type" ); imc_logout( ic, FALSE ); return( 0 ); } @@ -251,7 +251,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) { if( num_parts != 4 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -260,7 +260,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( md->handler->msglen <= 0 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -291,7 +291,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 4 && num_parts != 5 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -327,7 +327,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) { if( ic->flags & OPT_LOGGED_IN ) { - imc_log( ic, "Successfully transferred to different server" ); + imcb_log( ic, "Successfully transferred to different server" ); g_snprintf( buf, sizeof( buf ), "CHG %d %s %d\r\n", ++md->trId, md->away_state->code, 0 ); return( msn_write( ic, buf, strlen( buf ) ) ); } @@ -343,7 +343,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 4 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -362,7 +362,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 3 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -384,7 +384,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 6 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -412,7 +412,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 5 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -437,7 +437,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( num_parts != 7 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -447,7 +447,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) server = strchr( cmd[2], ':' ); if( !server ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -457,7 +457,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( strcmp( cmd[3], "CKI" ) != 0 ) { - imc_error( ic, "Unknown authentication method for switchboard" ); + imcb_error( ic, "Unknown authentication method for switchboard" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -477,7 +477,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( strchr( cmd[4], '@' ) == NULL ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -500,16 +500,16 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 ) { - imc_error( ic, "Someone else logged in with your account" ); + imcb_error( ic, "Someone else logged in with your account" ); allow_reconnect = FALSE; } else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 ) { - imc_error( ic, "Terminating session because of server shutdown" ); + imcb_error( ic, "Terminating session because of server shutdown" ); } else { - imc_error( ic, "Session terminated by remote server (reason unknown)" ); + imcb_error( ic, "Session terminated by remote server (reason unknown)" ); } imc_logout( ic, allow_reconnect ); @@ -519,7 +519,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) { if( num_parts != 5 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -547,13 +547,13 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) } else if( strcmp( cmd[0], "IPG" ) == 0 ) { - imc_error( ic, "Received IPG command, we don't handle them yet." ); + imcb_error( ic, "Received IPG command, we don't handle them yet." ); md->handler->msglen = atoi( cmd[1] ); if( md->handler->msglen <= 0 ) { - imc_error( ic, "Syntax error" ); + imcb_error( ic, "Syntax error" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -563,7 +563,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) int num = atoi( cmd[0] ); const struct msn_status_code *err = msn_status_by_number( num ); - imc_error( ic, "Error reported by MSN server: %s", err->text ); + imcb_error( ic, "Error reported by MSN server: %s", err->text ); if( err->flags & STATUS_FATAL ) { @@ -617,7 +617,7 @@ static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int if( mtype && strcmp( mtype, "1" ) == 0 ) { if( arg1 ) - imc_log( ic, "The server is going down for maintenance in %s minutes.", arg1 ); + imcb_log( ic, "The server is going down for maintenance in %s minutes.", arg1 ); } if( arg1 ) g_free( arg1 ); @@ -634,7 +634,7 @@ static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int if( inbox && folders ) { - imc_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders ); + imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders ); } } else if( g_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 ) @@ -644,7 +644,7 @@ static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int if( from && fromname ) { - imc_log( ic, "Received an e-mail message from %s <%s>.", fromname, from ); + imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from ); } } else if( g_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 ) @@ -672,7 +672,7 @@ static void msn_auth_got_passport_id( struct passport_reply *rep ) if( key == NULL ) { - imc_error( ic, "Error during Passport authentication (%s)", + imcb_error( ic, "Error during Passport authentication (%s)", rep->error_string ? rep->error_string : "Unknown error" ); imc_logout( ic, TRUE ); } diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c index f8413856..614fb79c 100644 --- a/protocols/msn/sb.c +++ b/protocols/msn/sb.c @@ -221,7 +221,7 @@ void msn_sb_destroy( struct msn_switchboard *sb ) } g_slist_free( sb->msgq ); - imc_log( ic, "Warning: Closing down MSN switchboard connection with " + imcb_log( ic, "Warning: Closing down MSN switchboard connection with " "unsent message to %s, you'll have to resend it.", sb->who ? sb->who : "(unknown)" ); } @@ -320,7 +320,7 @@ static int msn_sb_command( gpointer data, char **cmd, int num_parts ) if( strcmp( cmd[0], "XFR" ) == 0 ) { - imc_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" ); + imcb_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" ); imc_logout( ic, TRUE ); return( 0 ); } @@ -527,7 +527,7 @@ static int msn_sb_command( gpointer data, char **cmd, int num_parts ) int num = atoi( cmd[0] ); const struct msn_status_code *err = msn_status_by_number( num ); - imc_error( ic, "Error reported by switchboard server: %s", err->text ); + imcb_error( ic, "Error reported by switchboard server: %s", err->text ); if( err->flags & STATUS_SB_FATAL ) { |