Changeset 84b045d


Ignore:
Timestamp:
2007-04-16T01:03:08Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
6bbb939
Parents:
c2fb3809
Message:

s/imc/imcb/ for callback functions. Moved things aroundin nogaim.h a
little bit, grouping things by category instead of original Gaim 0.58
filename.

Files:
28 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rc2fb3809 r84b045d  
    1212objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o user.o
    1313headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ini.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h url.h user.h protocols/http_client.h protocols/md5.h protocols/nogaim.h protocols/proxy.h protocols/sha.h protocols/ssl_client.h
    14 subdirs = protocols lib
     14subdirs = lib protocols
    1515
    1616# Expansion of variables
  • irc.c

    rc2fb3809 r84b045d  
    10371037        else if( c && c->ic && c->ic->acc && c->ic->acc->prpl )
    10381038        {
    1039                 return( bim_chat_msg( c, s, 0 ) );
     1039                return( imc_chat_msg( c, s, 0 ) );
    10401040        }
    10411041       
     
    10521052       
    10531053        u->sendbuf[u->sendbuf_len-2] = 0; /* Cut off the last newline */
    1054         bim_buddy_msg( u->ic, u->handle, u->sendbuf, u->sendbuf_flags );
     1054        imc_buddy_msg( u->ic, u->handle, u->sendbuf, u->sendbuf_flags );
    10551055       
    10561056        g_free( u->sendbuf );
     
    11041104        else
    11051105        {
    1106                 bim_buddy_msg( u->ic, u->handle, msg, flags );
     1106                imc_buddy_msg( u->ic, u->handle, msg, flags );
    11071107        }
    11081108}
  • irc_commands.c

    rc2fb3809 r84b045d  
    463463               
    464464                if( ic && ic->flags & OPT_LOGGED_IN )
    465                         bim_set_away( ic, u->away );
     465                        imc_set_away( ic, u->away );
    466466        }
    467467}
  • protocols/jabber/io.c

    rc2fb3809 r84b045d  
    117117                jd->fd = -1;
    118118               
    119                 imc_error( ic, "Short write() to server" );
     119                imcb_error( ic, "Short write() to server" );
    120120                imc_logout( ic, TRUE );
    121121                return FALSE;
     
    160160                if( xt_feed( jd->xt, buf, st ) < 0 )
    161161                {
    162                         imc_error( ic, "XML stream error" );
     162                        imcb_error( ic, "XML stream error" );
    163163                        imc_logout( ic, TRUE );
    164164                        return FALSE;
     
    203203                                        if( set_getbool( &ic->acc->set, "tls" ) )
    204204                                        {
    205                                                 imc_error( ic, "TLS is turned on for this "
     205                                                imcb_error( ic, "TLS is turned on for this "
    206206                                                          "account, but is not supported by this server" );
    207207                                                imc_logout( ic, FALSE );
     
    216216                        else
    217217                        {
    218                                 imc_error( ic, "XML stream error" );
     218                                imcb_error( ic, "XML stream error" );
    219219                                imc_logout( ic, TRUE );
    220220                                return FALSE;
     
    227227                jd->fd = -1;
    228228               
    229                 imc_error( ic, "Error while reading from server" );
     229                imcb_error( ic, "Error while reading from server" );
    230230                imc_logout( ic, TRUE );
    231231                return FALSE;
     
    242242        if( source == -1 )
    243243        {
    244                 imc_error( ic, "Could not connect to server" );
     244                imcb_error( ic, "Could not connect to server" );
    245245                imc_logout( ic, TRUE );
    246246                return FALSE;
    247247        }
    248248       
    249         imc_log( ic, "Connected to server, logging in" );
     249        imcb_log( ic, "Connected to server, logging in" );
    250250       
    251251        return jabber_start_stream( ic );
     
    263263                jd->ssl = NULL;
    264264               
    265                 imc_error( ic, "Could not connect to server" );
     265                imcb_error( ic, "Could not connect to server" );
    266266                imc_logout( ic, TRUE );
    267267                return FALSE;
    268268        }
    269269       
    270         imc_log( ic, "Connected to server, logging in" );
     270        imcb_log( ic, "Connected to server, logging in" );
    271271       
    272272        return jabber_start_stream( ic );
     
    297297                if( c && ( !trytls && !set_getbool( &ic->acc->set, "tls" ) ) )
    298298                {
    299                         imc_error( ic, "Server requires TLS connections, but TLS is turned off for this account" );
     299                        imcb_error( ic, "Server requires TLS connections, but TLS is turned off for this account" );
    300300                        imc_logout( ic, FALSE );
    301301                       
     
    327327                if( !trytls && set_getbool( &ic->acc->set, "tls" ) )
    328328                {
    329                         imc_error( ic, "TLS is turned on for this account, but is not supported by this server" );
     329                        imcb_error( ic, "TLS is turned on for this account, but is not supported by this server" );
    330330                        imc_logout( ic, FALSE );
    331331                       
     
    417417        jd->w_inpa = jd->r_inpa = 0;
    418418       
    419         imc_log( ic, "Converting stream to TLS" );
     419        imcb_log( ic, "Converting stream to TLS" );
    420420       
    421421        jd->ssl = ssl_starttls( jd->fd, jabber_connected_ssl, ic );
     
    453453        if( type == NULL )
    454454        {
    455                 imc_error( ic, "Unknown stream error reported by server" );
     455                imcb_error( ic, "Unknown stream error reported by server" );
    456456                imc_logout( ic, allow_reconnect );
    457457                return XT_ABORT;
     
    463463        if( strcmp( type, "conflict" ) == 0 )
    464464        {
    465                 imc_error( ic, "Account and resource used from a different location" );
     465                imcb_error( ic, "Account and resource used from a different location" );
    466466                allow_reconnect = FALSE;
    467467        }
    468468        else
    469469        {
    470                 imc_error( ic, "Stream error: %s%s%s", type, text ? ": " : "", text ? text : "" );
     470                imcb_error( ic, "Stream error: %s%s%s", type, text ? ": " : "", text ? text : "" );
    471471        }
    472472       
  • protocols/jabber/iq.c

    rc2fb3809 r84b045d  
    3939        if( !type )
    4040        {
    41                 imc_error( ic, "Received IQ packet without type." );
     41                imcb_error( ic, "Received IQ packet without type." );
    4242                imc_logout( ic, TRUE );
    4343                return XT_ABORT;
     
    6060               
    6161                if( entry == NULL )
    62                         imc_log( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
     62                        imcb_log( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
    6363                else if( entry->func )
    6464                        return entry->func( ic, node, entry->node );
     
    6969                    !( s = xt_find_attr( c, "xmlns" ) ) )
    7070                {
    71                         imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
     71                        imcb_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
    7272                        return XT_HANDLED;
    7373                }
     
    132132                    !( s = xt_find_attr( c, "xmlns" ) ) )
    133133                {
    134                         imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
     134                        imcb_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
    135135                        return XT_HANDLED;
    136136                }
     
    154154                        else
    155155                        {
    156                                 imc_log( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
     156                                imcb_log( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
    157157                               
    158158                                xt_free_node( reply );
     
    219219        if( !( query = xt_find_node( node->children, "query" ) ) )
    220220        {
    221                 imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
     221                imcb_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
    222222                imc_logout( ic, FALSE );
    223223                return XT_HANDLED;
     
    258258                xt_free_node( reply );
    259259               
    260                 imc_error( ic, "Can't find suitable authentication method" );
     260                imcb_error( ic, "Can't find suitable authentication method" );
    261261                imc_logout( ic, FALSE );
    262262                return XT_ABORT;
     
    277277        if( !( type = xt_find_attr( node, "type" ) ) )
    278278        {
    279                 imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
     279                imcb_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
    280280                imc_logout( ic, FALSE );
    281281                return XT_HANDLED;
     
    284284        if( strcmp( type, "error" ) == 0 )
    285285        {
    286                 imc_error( ic, "Authentication failure" );
     286                imcb_error( ic, "Authentication failure" );
    287287                imc_logout( ic, FALSE );
    288288                return XT_ABORT;
     
    311311                if( c && c->text_len && ( s = strchr( c->text, '/' ) ) &&
    312312                    strcmp( s + 1, set_getstr( &ic->acc->set, "resource" ) ) != 0 )
    313                         imc_log( ic, "Server changed session resource string to `%s'", s + 1 );
     313                        imcb_log( ic, "Server changed session resource string to `%s'", s + 1 );
    314314               
    315315                jd->flags &= ~JFLAG_WAIT_BIND;
     
    334334        int st;
    335335       
    336         imc_log( ic, "Authenticated, requesting buddy list" );
     336        imcb_log( ic, "Authenticated, requesting buddy list" );
    337337       
    338338        node = xt_new_node( "query", NULL, NULL );
     
    353353        if( !( query = xt_find_node( node->children, "query" ) ) )
    354354        {
    355                 imc_log( ic, "WARNING: Received NULL roster packet" );
     355                imcb_log( ic, "WARNING: Received NULL roster packet" );
    356356                return XT_HANDLED;
    357357        }
     
    397397       
    398398        if( initial )
    399                 imc_connected( ic );
     399                imcb_connected( ic );
    400400       
    401401        return XT_HANDLED;
     
    428428        {
    429429                s = xt_find_attr( orig, "to" ); /* If this returns NULL something's wrong.. */
    430                 imc_log( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
     430                imcb_log( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
    431431                return XT_HANDLED;
    432432        }
     
    536536        /* *sigh* */
    537537       
    538         imc_log( ic, "%s", reply->str );
     538        imcb_log( ic, "%s", reply->str );
    539539        g_string_free( reply, TRUE );
    540540       
  • protocols/jabber/jabber.c

    rc2fb3809 r84b045d  
    5959static void jabber_login( account_t *acc )
    6060{
    61         struct im_connection *ic = imc_new( acc );
     61        struct im_connection *ic = imcb_new( acc );
    6262        struct jabber_data *jd = g_new0( struct jabber_data, 1 );
    6363        struct ns_srv_reply *srv = NULL;
     
    7272        if( jd->server == NULL )
    7373        {
    74                 imc_error( ic, "Incomplete account name (format it like <username@jabberserver.name>)" );
     74                imcb_error( ic, "Incomplete account name (format it like <username@jabberserver.name>)" );
    7575                imc_logout( ic, FALSE );
    7676                return;
     
    159159                connect_to = jd->server;
    160160       
    161         imc_log( ic, "Connecting" );
     161        imcb_log( ic, "Connecting" );
    162162       
    163163        if( set_getint( &acc->set, "port" ) < JABBER_PORT_MIN ||
    164164            set_getint( &acc->set, "port" ) > JABBER_PORT_MAX )
    165165        {
    166                 imc_log( ic, "Incorrect port number, must be in the %d-%d range",
     166                imcb_log( ic, "Incorrect port number, must be in the %d-%d range",
    167167                               JABBER_PORT_MIN, JABBER_PORT_MAX );
    168168                imc_logout( ic, FALSE );
     
    186186        if( jd->fd == -1 )
    187187        {
    188                 imc_error( ic, "Could not connect to server" );
     188                imcb_error( ic, "Could not connect to server" );
    189189                imc_logout( ic, TRUE );
    190190        }
     
    285285        while( bud )
    286286        {
    287                 imc_log( ic, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
     287                imcb_log( ic, "Buddy %s (%d) information:\nAway state: %s\nAway message: %s",
    288288                                   bud->full_jid, bud->priority,
    289289                                   bud->away_state ? bud->away_state->full_name : "(none)",
  • protocols/jabber/jabber_util.c

    rc2fb3809 r84b045d  
    224224       
    225225        if( find_buddy( bla->ic, bla->handle ) == NULL )
    226                 show_got_added( bla->ic, bla->handle, NULL );
     226                imcb_ask_add( bla->ic, bla->handle, NULL );
    227227       
    228228        g_free( bla->handle );
     
    247247       
    248248        buf = g_strdup_printf( "The user %s wants to add you to his/her buddy list.", handle );
    249         do_ask_dialog( ic, buf, bla, jabber_buddy_ask_yes, jabber_buddy_ask_no );
     249        imcb_ask( ic, buf, bla, jabber_buddy_ask_yes, jabber_buddy_ask_no );
    250250        g_free( buf );
    251251}
  • protocols/jabber/presence.c

    rc2fb3809 r84b045d  
    4141                {
    4242                        if( set_getbool( &ic->irc->set, "debug" ) )
    43                                 imc_log( ic, "WARNING: Could not handle presence information from JID: %s", from );
     43                                imcb_log( ic, "WARNING: Could not handle presence information from JID: %s", from );
    4444                        return XT_HANDLED;
    4545                }
     
    7474                {
    7575                        if( set_getbool( &ic->irc->set, "debug" ) )
    76                                 imc_log( ic, "WARNING: Received presence information from unknown JID: %s", from );
     76                                imcb_log( ic, "WARNING: Received presence information from unknown JID: %s", from );
    7777                        return XT_HANDLED;
    7878                }
     
    103103        {
    104104                /* Not sure about this one, actually... */
    105                 imc_log( ic, "%s just accepted your authorization request", from );
     105                imcb_log( ic, "%s just accepted your authorization request", from );
    106106        }
    107107        else if( strcmp( type, "unsubscribe" ) == 0 || strcmp( type, "unsubscribed" ) == 0 )
  • protocols/jabber/sasl.c

    rc2fb3809 r84b045d  
    3838                   IQ authentication. Strange things happen when you try
    3939                   to do both... */
    40                 imc_log( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" );
     40                imcb_log( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" );
    4141                return XT_HANDLED;
    4242        }
     
    4545        if( !s || strcmp( s, XMLNS_SASL ) != 0 )
    4646        {
    47                 imc_log( ic, "Stream error while authenticating" );
     47                imcb_log( ic, "Stream error while authenticating" );
    4848                imc_logout( ic, FALSE );
    4949                return XT_ABORT;
     
    6363        if( !sup_plain && !sup_digest )
    6464        {
    65                 imc_error( ic, "No known SASL authentication schemes supported" );
     65                imcb_error( ic, "No known SASL authentication schemes supported" );
    6666                imc_logout( ic, FALSE );
    6767                return XT_ABORT;
     
    280280
    281281error:
    282         imc_error( ic, "Incorrect SASL challenge received" );
     282        imcb_error( ic, "Incorrect SASL challenge received" );
    283283        imc_logout( ic, FALSE );
    284284
     
    304304        if( !s || strcmp( s, XMLNS_SASL ) != 0 )
    305305        {
    306                 imc_log( ic, "Stream error while authenticating" );
     306                imcb_log( ic, "Stream error while authenticating" );
    307307                imc_logout( ic, FALSE );
    308308                return XT_ABORT;
     
    311311        if( strcmp( node->name, "success" ) == 0 )
    312312        {
    313                 imc_log( ic, "Authentication finished" );
     313                imcb_log( ic, "Authentication finished" );
    314314                jd->flags |= JFLAG_AUTHENTICATED | JFLAG_STREAM_RESTART;
    315315        }
    316316        else if( strcmp( node->name, "failure" ) == 0 )
    317317        {
    318                 imc_error( ic, "Authentication failure" );
     318                imcb_error( ic, "Authentication failure" );
    319319                imc_logout( ic, FALSE );
    320320                return XT_ABORT;
  • protocols/msn/msn.c

    rc2fb3809 r84b045d  
    3939static void msn_login( account_t *acc )
    4040{
    41         struct im_connection *ic = imc_new( acc );
     41        struct im_connection *ic = imcb_new( acc );
    4242        struct msn_data *md = g_new0( struct msn_data, 1 );
    4343       
     
    4747        if( strchr( acc->user, '@' ) == NULL )
    4848        {
    49                 imc_error( ic, "Invalid account name" );
     49                imcb_error( ic, "Invalid account name" );
    5050                imc_logout( ic, FALSE );
    5151                return;
    5252        }
    5353       
    54         imc_log( ic, "Connecting" );
     54        imcb_log( ic, "Connecting" );
    5555       
    5656        md->fd = proxy_connect( "messenger.hotmail.com", 1863, msn_ns_connected, ic );
    5757        if( md->fd < 0 )
    5858        {
    59                 imc_error( ic, "Could not connect to server" );
     59                imcb_error( ic, "Could not connect to server" );
    6060                imc_logout( ic, TRUE );
    6161                return;
     
    9696                                m = l->data;
    9797                       
    98                                 imc_log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who );
     98                                imcb_log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who );
    9999                                g_free( m->who );
    100100                                g_free( m->text );
     
    228228{
    229229        /* Just make an URL and let the user fetch the info */
    230         imc_log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who );
     230        imcb_log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who );
    231231}
    232232
     
    373373        if( strlen( value ) > 129 )
    374374        {
    375                 imc_log( ic, "Maximum name length exceeded" );
     375                imcb_log( ic, "Maximum name length exceeded" );
    376376                return NULL;
    377377        }
  • protocols/msn/msn_util.c

    rc2fb3809 r84b045d  
    3636        if( st != len )
    3737        {
    38                 imc_error( ic, "Short write() to main server" );
     38                imcb_error( ic, "Short write() to main server" );
    3939                imc_logout( ic, TRUE );
    4040                return( 0 );
     
    4646int msn_logged_in( struct im_connection *ic )
    4747{
    48         imc_connected( ic );
     48        imcb_connected( ic );
    4949       
    5050        return( 0 );
     
    9595       
    9696        if( find_buddy( bla->ic, bla->handle ) == NULL )
    97                 show_got_added( bla->ic, bla->handle, NULL );
     97                imcb_ask_add( bla->ic, bla->handle, NULL );
    9898       
    9999        g_free( bla->handle );
     
    123123                    "The user %s (%s) wants to add you to his/her buddy list.",
    124124                    handle, realname );
    125         do_ask_dialog( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no );
     125        imcb_ask( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no );
    126126}
    127127
  • protocols/msn/ns.c

    rc2fb3809 r84b045d  
    4747        if( source == -1 )
    4848        {
    49                 imc_error( ic, "Could not connect to server" );
     49                imcb_error( ic, "Could not connect to server" );
    5050                imc_logout( ic, TRUE );
    5151                return FALSE;
     
    7676        {
    7777                ic->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, ic );
    78                 imc_log( ic, "Connected to server, waiting for reply" );
     78                imcb_log( ic, "Connected to server, waiting for reply" );
    7979        }
    8080       
     
    8989        if( msn_handler( md->handler ) == -1 ) /* Don't do this on ret == 0, it's already done then. */
    9090        {
    91                 imc_error( ic, "Error while reading from server" );
     91                imcb_error( ic, "Error while reading from server" );
    9292                imc_logout( ic, TRUE );
    9393               
     
    114114                if( cmd[2] && strncmp( cmd[2], "MSNP8", 5 ) != 0 )
    115115                {
    116                         imc_error( ic, "Unsupported protocol" );
     116                        imcb_error( ic, "Unsupported protocol" );
    117117                        imc_logout( ic, FALSE );
    118118                        return( 0 );
     
    143143                        if( !server )
    144144                        {
    145                                 imc_error( ic, "Syntax error" );
     145                                imcb_error( ic, "Syntax error" );
    146146                                imc_logout( ic, TRUE );
    147147                                return( 0 );
     
    151151                        server = cmd[3];
    152152                       
    153                         imc_log( ic, "Transferring to other server" );
     153                        imcb_log( ic, "Transferring to other server" );
    154154                       
    155155                        md->fd = proxy_connect( server, port, msn_ns_connected, ic );
     
    162162                        if( !server )
    163163                        {
    164                                 imc_error( ic, "Syntax error" );
     164                                imcb_error( ic, "Syntax error" );
    165165                                imc_logout( ic, TRUE );
    166166                                return( 0 );
     
    172172                        if( strcmp( cmd[4], "CKI" ) != 0 )
    173173                        {
    174                                 imc_error( ic, "Unknown authentication method for switchboard" );
     174                                imcb_error( ic, "Unknown authentication method for switchboard" );
    175175                                imc_logout( ic, TRUE );
    176176                                return( 0 );
     
    204204                else
    205205                {
    206                         imc_error( ic, "Syntax error" );
     206                        imcb_error( ic, "Syntax error" );
    207207                        imc_logout( ic, TRUE );
    208208                        return( 0 );
     
    216216                        if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) )
    217217                        {
    218                                 imc_error( ic, "Error while contacting Passport server" );
     218                                imcb_error( ic, "Error while contacting Passport server" );
    219219                                imc_logout( ic, TRUE );
    220220                                return( 0 );
     
    236236                        }
    237237                       
    238                         imc_log( ic, "Authenticated, getting buddy list" );
     238                        imcb_log( ic, "Authenticated, getting buddy list" );
    239239                       
    240240                        g_snprintf( buf, sizeof( buf ), "SYN %d 0\r\n", ++md->trId );
     
    243243                else
    244244                {
    245                         imc_error( ic, "Unknown authentication type" );
     245                        imcb_error( ic, "Unknown authentication type" );
    246246                        imc_logout( ic, FALSE );
    247247                        return( 0 );
     
    252252                if( num_parts != 4 )
    253253                {
    254                         imc_error( ic, "Syntax error" );
     254                        imcb_error( ic, "Syntax error" );
    255255                        imc_logout( ic, TRUE );
    256256                        return( 0 );
     
    261261                if( md->handler->msglen <= 0 )
    262262                {
    263                         imc_error( ic, "Syntax error" );
     263                        imcb_error( ic, "Syntax error" );
    264264                        imc_logout( ic, TRUE );
    265265                        return( 0 );
     
    292292                if( num_parts != 4 && num_parts != 5 )
    293293                {
    294                         imc_error( ic, "Syntax error" );
     294                        imcb_error( ic, "Syntax error" );
    295295                        imc_logout( ic, TRUE );
    296296                        return( 0 );
     
    328328                        if( ic->flags & OPT_LOGGED_IN )
    329329                        {
    330                                 imc_log( ic, "Successfully transferred to different server" );
     330                                imcb_log( ic, "Successfully transferred to different server" );
    331331                                g_snprintf( buf, sizeof( buf ), "CHG %d %s %d\r\n", ++md->trId, md->away_state->code, 0 );
    332332                                return( msn_write( ic, buf, strlen( buf ) ) );
     
    344344                if( num_parts != 4 )
    345345                {
    346                         imc_error( ic, "Syntax error" );
     346                        imcb_error( ic, "Syntax error" );
    347347                        imc_logout( ic, TRUE );
    348348                        return( 0 );
     
    363363                if( num_parts != 3 )
    364364                {
    365                         imc_error( ic, "Syntax error" );
     365                        imcb_error( ic, "Syntax error" );
    366366                        imc_logout( ic, TRUE );
    367367                        return( 0 );
     
    385385                if( num_parts != 6 )
    386386                {
    387                         imc_error( ic, "Syntax error" );
     387                        imcb_error( ic, "Syntax error" );
    388388                        imc_logout( ic, TRUE );
    389389                        return( 0 );
     
    413413                if( num_parts != 5 )
    414414                {
    415                         imc_error( ic, "Syntax error" );
     415                        imcb_error( ic, "Syntax error" );
    416416                        imc_logout( ic, TRUE );
    417417                        return( 0 );
     
    438438                if( num_parts != 7 )
    439439                {
    440                         imc_error( ic, "Syntax error" );
     440                        imcb_error( ic, "Syntax error" );
    441441                        imc_logout( ic, TRUE );
    442442                        return( 0 );
     
    448448                if( !server )
    449449                {
    450                         imc_error( ic, "Syntax error" );
     450                        imcb_error( ic, "Syntax error" );
    451451                        imc_logout( ic, TRUE );
    452452                        return( 0 );
     
    458458                if( strcmp( cmd[3], "CKI" ) != 0 )
    459459                {
    460                         imc_error( ic, "Unknown authentication method for switchboard" );
     460                        imcb_error( ic, "Unknown authentication method for switchboard" );
    461461                        imc_logout( ic, TRUE );
    462462                        return( 0 );
     
    478478                        if( strchr( cmd[4], '@' ) == NULL )
    479479                        {
    480                                 imc_error( ic, "Syntax error" );
     480                                imcb_error( ic, "Syntax error" );
    481481                                imc_logout( ic, TRUE );
    482482                                return( 0 );
     
    501501                if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 )
    502502                {
    503                         imc_error( ic, "Someone else logged in with your account" );
     503                        imcb_error( ic, "Someone else logged in with your account" );
    504504                        allow_reconnect = FALSE;
    505505                }
    506506                else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 )
    507507                {
    508                         imc_error( ic, "Terminating session because of server shutdown" );
     508                        imcb_error( ic, "Terminating session because of server shutdown" );
    509509                }
    510510                else
    511511                {
    512                         imc_error( ic, "Session terminated by remote server (reason unknown)" );
     512                        imcb_error( ic, "Session terminated by remote server (reason unknown)" );
    513513                }
    514514               
     
    520520                if( num_parts != 5 )
    521521                {
    522                         imc_error( ic, "Syntax error" );
     522                        imcb_error( ic, "Syntax error" );
    523523                        imc_logout( ic, TRUE );
    524524                        return( 0 );
     
    548548        else if( strcmp( cmd[0], "IPG" ) == 0 )
    549549        {
    550                 imc_error( ic, "Received IPG command, we don't handle them yet." );
     550                imcb_error( ic, "Received IPG command, we don't handle them yet." );
    551551               
    552552                md->handler->msglen = atoi( cmd[1] );
     
    554554                if( md->handler->msglen <= 0 )
    555555                {
    556                         imc_error( ic, "Syntax error" );
     556                        imcb_error( ic, "Syntax error" );
    557557                        imc_logout( ic, TRUE );
    558558                        return( 0 );
     
    564564                const struct msn_status_code *err = msn_status_by_number( num );
    565565               
    566                 imc_error( ic, "Error reported by MSN server: %s", err->text );
     566                imcb_error( ic, "Error reported by MSN server: %s", err->text );
    567567               
    568568                if( err->flags & STATUS_FATAL )
     
    618618                                {
    619619                                        if( arg1 )
    620                                                 imc_log( ic, "The server is going down for maintenance in %s minutes.", arg1 );
     620                                                imcb_log( ic, "The server is going down for maintenance in %s minutes.", arg1 );
    621621                                }
    622622                               
     
    635635                                if( inbox && folders )
    636636                                {
    637                                         imc_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );
     637                                        imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );
    638638                                }
    639639                        }
     
    645645                                if( from && fromname )
    646646                                {
    647                                         imc_log( ic, "Received an e-mail message from %s <%s>.", fromname, from );
     647                                        imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from );
    648648                                }
    649649                        }
     
    673673        if( key == NULL )
    674674        {
    675                 imc_error( ic, "Error during Passport authentication (%s)",
     675                imcb_error( ic, "Error during Passport authentication (%s)",
    676676                               rep->error_string ? rep->error_string : "Unknown error" );
    677677                imc_logout( ic, TRUE );
  • protocols/msn/sb.c

    rc2fb3809 r84b045d  
    222222                g_slist_free( sb->msgq );
    223223               
    224                 imc_log( ic, "Warning: Closing down MSN switchboard connection with "
     224                imcb_log( ic, "Warning: Closing down MSN switchboard connection with "
    225225                                   "unsent message to %s, you'll have to resend it.",
    226226                                   sb->who ? sb->who : "(unknown)" );
     
    321321        if( strcmp( cmd[0], "XFR" ) == 0 )
    322322        {
    323                 imc_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" );
     323                imcb_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" );
    324324                imc_logout( ic, TRUE );
    325325                return( 0 );
     
    528528                const struct msn_status_code *err = msn_status_by_number( num );
    529529               
    530                 imc_error( ic, "Error reported by switchboard server: %s", err->text );
     530                imcb_error( ic, "Error reported by switchboard server: %s", err->text );
    531531               
    532532                if( err->flags & STATUS_SB_FATAL )
  • protocols/nogaim.c

    rc2fb3809 r84b045d  
    145145/* multi.c */
    146146
    147 struct im_connection *imc_new( account_t *acc )
     147struct im_connection *imcb_new( account_t *acc )
    148148{
    149149        struct im_connection *ic;
     
    204204}
    205205
    206 void imc_log( struct im_connection *ic, char *format, ... )
     206void imcb_log( struct im_connection *ic, char *format, ... )
    207207{
    208208        va_list params;
     
    221221}
    222222
    223 void imc_error( struct im_connection *ic, char *format, ... )
     223void imcb_error( struct im_connection *ic, char *format, ... )
    224224{
    225225        va_list params;
     
    248248}
    249249
    250 void imc_connected( struct im_connection *ic )
     250void imcb_connected( struct im_connection *ic )
    251251{
    252252        user_t *u;
     
    260260        u = user_find( ic->irc, ic->irc->nick );
    261261       
    262         imc_log( ic, "Logged in" );
     262        imcb_log( ic, "Logged in" );
    263263       
    264264        ic->keepalive = b_timeout_add( 60000, send_keepalive, ic );
     
    267267        /* Also necessary when we're not away, at least for some of the
    268268           protocols. */
    269         bim_set_away( ic, u->away );
     269        imc_set_away( ic, u->away );
    270270}
    271271
     
    300300                ic->flags |= OPT_LOGGING_OUT;
    301301       
    302         imc_log( ic, "Signing off.." );
     302        imcb_log( ic, "Signing off.." );
    303303       
    304304        b_event_remove( ic->keepalive );
     
    334334                int delay = set_getint( &irc->set, "auto_reconnect_delay" );
    335335               
    336                 imc_log( ic, "Reconnecting in %d seconds..", delay );
     336                imcb_log( ic, "Reconnecting in %d seconds..", delay );
    337337                a->reconnect = b_timeout_add( delay * 1000, auto_reconnect, a );
    338338        }
     
    344344/* dialogs.c */
    345345
    346 void do_ask_dialog( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
     346void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
    347347{
    348348        query_add( ic->irc, ic, msg, doit, dont, data );
     
    360360       
    361361        if( set_getbool( &irc->set, "debug" ) && 0 ) /* This message is too useless */
    362                 imc_log( ic, "Receiving user add from handle: %s", handle );
     362                imcb_log( ic, "Receiving user add from handle: %s", handle );
    363363       
    364364        if( user_findhandle( ic, handle ) )
    365365        {
    366366                if( set_getbool( &irc->set, "debug" ) )
    367                         imc_log( ic, "User already exists, ignoring add request: %s", handle );
     367                        imcb_log( ic, "User already exists, ignoring add request: %s", handle );
    368368               
    369369                return;
     
    448448               
    449449                if( ( ic->flags & OPT_LOGGED_IN ) && set_getbool( &ic->irc->set, "display_namechanges" ) )
    450                         imc_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
     450                        imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
    451451        }
    452452}
     
    475475}
    476476
    477 void show_got_added( struct im_connection *ic, char *handle, const char *realname )
     477void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname )
    478478{
    479479        struct show_got_added_data *data = g_new0( struct show_got_added_data, 1 );
     
    512512                        if( set_getbool( &ic->irc->set, "debug" ) || g_strcasecmp( set_getstr( &ic->irc->set, "handle_unknown" ), "ignore" ) != 0 )
    513513                        {
    514                                 imc_log( ic, "serv_got_update() for handle %s:", handle );
    515                                 imc_log( ic, "loggedin = %d, type = %d", loggedin, type );
     514                                imcb_log( ic, "serv_got_update() for handle %s:", handle );
     515                                imcb_log( ic, "loggedin = %d, type = %d", loggedin, type );
    516516                        }
    517517                       
     
    551551        {
    552552                u->away = g_strdup( "Away" );
    553         }
    554         else if( ( type & UC_UNAVAILABLE ) && ( strcmp( ic->acc->prpl->name, "jabber" ) == 0 ) )
    555         {
    556                 if( type & UC_DND )
    557                         u->away = g_strdup( "Do Not Disturb" );
    558                 else if( type & UC_XA )
    559                         u->away = g_strdup( "Extended Away" );
    560                 else // if( type & UC_AWAY )
    561                         u->away = g_strdup( "Away" );
    562553        }
    563554        else if( ( type & UC_UNAVAILABLE ) && ic->acc->prpl->get_status_string )
     
    593584                {
    594585                        if( set_getbool( &irc->set, "debug" ) )
    595                                 imc_log( ic, "Ignoring message from unknown handle %s", handle );
     586                                imcb_log( ic, "Ignoring message from unknown handle %s", handle );
    596587                       
    597588                        return;
     
    615606                else
    616607                {
    617                         imc_log( ic, "Message from unknown handle %s:", handle );
     608                        imcb_log( ic, "Message from unknown handle %s:", handle );
    618609                        u = user_find( irc, irc->mynick );
    619610                }
     
    685676       
    686677        if( set_getbool( &ic->irc->set, "debug" ) )
    687                 imc_log( ic, "You were removed from conversation 0x%x", (int) c );
     678                imcb_log( ic, "You were removed from conversation 0x%x", (int) c );
    688679       
    689680        if( c )
     
    733724                irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", msg );
    734725        else
    735                 imc_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg );
     726                imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg );
    736727}
    737728
     
    755746       
    756747        if( set_getbool( &ic->irc->set, "debug" ) )
    757                 imc_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
     748                imcb_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
    758749       
    759750        return c;
     
    769760       
    770761        if( set_getbool( &b->ic->irc->set, "debug" ) )
    771                 imc_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
     762                imcb_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
    772763       
    773764        /* It might be yourself! */
     
    803794       
    804795        if( set_getbool( &b->ic->irc->set, "debug" ) )
    805                 imc_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
     796                imcb_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
    806797       
    807798        /* It might be yourself! */
     
    929920   them all from some wrappers. We'll start to define some down here: */
    930921
    931 int bim_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags )
     922int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags )
    932923{
    933924        char *buf = NULL;
     
    946937}
    947938
    948 int bim_chat_msg( struct groupchat *c, char *msg, int flags )
     939int imc_chat_msg( struct groupchat *c, char *msg, int flags )
    949940{
    950941        char *buf = NULL;
     
    962953}
    963954
    964 static char *bim_away_alias_find( GList *gcm, char *away );
    965 
    966 int bim_set_away( struct im_connection *ic, char *away )
     955static char *imc_away_alias_find( GList *gcm, char *away );
     956
     957int imc_set_away( struct im_connection *ic, char *away )
    967958{
    968959        GList *m, *ms;
     
    995986        else
    996987        {
    997                 s = bim_away_alias_find( ms, away );
     988                s = imc_away_alias_find( ms, away );
    998989                if( s )
    999990                {
    1000991                        ic->acc->prpl->set_away( ic, s, away );
    1001992                        if( set_getbool( &ic->irc->set, "debug" ) )
    1002                                 imc_log( ic, "Setting away state to %s", s );
     993                                imcb_log( ic, "Setting away state to %s", s );
    1003994                }
    1004995                else
     
    10091000}
    10101001
    1011 static char *bim_away_alias_list[8][5] =
     1002static char *imc_away_alias_list[8][5] =
    10121003{
    10131004        { "Away from computer", "Away", "Extended away", NULL },
     
    10211012};
    10221013
    1023 static char *bim_away_alias_find( GList *gcm, char *away )
     1014static char *imc_away_alias_find( GList *gcm, char *away )
    10241015{
    10251016        GList *m;
    10261017        int i, j;
    10271018       
    1028         for( i = 0; *bim_away_alias_list[i]; i ++ )
    1029         {
    1030                 for( j = 0; bim_away_alias_list[i][j]; j ++ )
    1031                         if( g_strncasecmp( away, bim_away_alias_list[i][j], strlen( bim_away_alias_list[i][j] ) ) == 0 )
     1019        for( i = 0; *imc_away_alias_list[i]; i ++ )
     1020        {
     1021                for( j = 0; imc_away_alias_list[i][j]; j ++ )
     1022                        if( g_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 )
    10321023                                break;
    10331024               
    1034                 if( !bim_away_alias_list[i][j] )        /* If we reach the end, this row */
     1025                if( !imc_away_alias_list[i][j] )        /* If we reach the end, this row */
    10351026                        continue;                       /* is not what we want. Next!    */
    10361027               
    10371028                /* Now find an entry in this row which exists in gcm */
    1038                 for( j = 0; bim_away_alias_list[i][j]; j ++ )
     1029                for( j = 0; imc_away_alias_list[i][j]; j ++ )
    10391030                {
    10401031                        m = gcm;
    10411032                        while( m )
    10421033                        {
    1043                                 if( g_strcasecmp( bim_away_alias_list[i][j], m->data ) == 0 )
    1044                                         return( bim_away_alias_list[i][j] );
     1034                                if( g_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 )
     1035                                        return( imc_away_alias_list[i][j] );
    10451036                                m = m->next;
    10461037                        }
     
    10511042}
    10521043
    1053 void bim_add_allow( struct im_connection *ic, char *handle )
     1044void imc_add_allow( struct im_connection *ic, char *handle )
    10541045{
    10551046        if( g_slist_find_custom( ic->permit, handle, (GCompareFunc) ic->acc->prpl->handle_cmp ) == NULL )
     
    10611052}
    10621053
    1063 void bim_rem_allow( struct im_connection *ic, char *handle )
     1054void imc_rem_allow( struct im_connection *ic, char *handle )
    10641055{
    10651056        GSList *l;
     
    10741065}
    10751066
    1076 void bim_add_block( struct im_connection *ic, char *handle )
     1067void imc_add_block( struct im_connection *ic, char *handle )
    10771068{
    10781069        if( g_slist_find_custom( ic->deny, handle, (GCompareFunc) ic->acc->prpl->handle_cmp ) == NULL )
     
    10841075}
    10851076
    1086 void bim_rem_block( struct im_connection *ic, char *handle )
     1077void imc_rem_block( struct im_connection *ic, char *handle )
    10871078{
    10881079        GSList *l;
  • protocols/nogaim.h

    rc2fb3809 r84b045d  
    150150       
    151151        /* Request profile info. Free-formatted stuff, the IM module gives back
    152            this info via imc_log(). */
     152           this info via imcb_log(). */
    153153        void (* get_info)       (struct im_connection *, char *who);
    154154        void (* set_my_name)    (struct im_connection *, char *name);
     
    175175#define UC_UNAVAILABLE  1
    176176
    177 /* JABBER */
    178 #define UC_AWAY (0x02 | UC_UNAVAILABLE)
    179 #define UC_CHAT  0x04
    180 #define UC_XA   (0x08 | UC_UNAVAILABLE)
    181 #define UC_DND  (0x10 | UC_UNAVAILABLE)
    182 
     177/* im_api core stuff. */
     178void nogaim_init();
    183179G_MODULE_EXPORT GSList *get_connections();
    184180G_MODULE_EXPORT struct prpl *find_protocol(const char *name);
    185181G_MODULE_EXPORT void register_protocol(struct prpl *);
    186182
    187 /* nogaim.c */
    188 int bim_set_away( struct im_connection *ic, char *away );
    189 int bim_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags );
    190 int bim_chat_msg( struct groupchat *c, char *msg, int flags );
    191 
    192 void bim_add_allow( struct im_connection *ic, char *handle );
    193 void bim_rem_allow( struct im_connection *ic, char *handle );
    194 void bim_add_block( struct im_connection *ic, char *handle );
    195 void bim_rem_block( struct im_connection *ic, char *handle );
    196 
    197 void nogaim_init();
    198 char *set_eval_away_devoice( set_t *set, char *value );
    199 
    200 gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond );
    201 void cancel_auto_reconnect( struct account *a );
    202 
    203 /* multi.c */
    204 G_MODULE_EXPORT struct im_connection *imc_new( account_t *acc );
    205 G_MODULE_EXPORT void imc_free( struct im_connection *ic );
    206 G_MODULE_EXPORT void imc_log( struct im_connection *ic, char *format, ... );
    207 G_MODULE_EXPORT void imc_error( struct im_connection *ic, char *format, ... );
    208 G_MODULE_EXPORT void imc_connected( struct im_connection *ic );
     183/* Connection management. */
     184G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc );
     185G_MODULE_EXPORT void imcb_free( struct im_connection *ic );
     186G_MODULE_EXPORT void imcb_connected( struct im_connection *ic );
    209187G_MODULE_EXPORT void imc_logout( struct im_connection *ic, int allow_reconnect );
    210188
    211 /* dialogs.c */
    212 G_MODULE_EXPORT void do_ask_dialog( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
    213 
    214 /* list.c */
    215 G_MODULE_EXPORT void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname );
    216 G_MODULE_EXPORT struct buddy *find_buddy( struct im_connection *ic, char *handle );
    217 G_MODULE_EXPORT void signoff_blocked( struct im_connection *ic );
    218 
    219 G_MODULE_EXPORT void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname );
    220 
    221 /* buddy_chat.c */
     189/* Communicating with the user. */
     190G_MODULE_EXPORT void imcb_log( struct im_connection *ic, char *format, ... );
     191G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... );
     192G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
     193G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname );
     194
     195/* Groupchats */
    222196G_MODULE_EXPORT void add_chat_buddy( struct groupchat *b, char *handle );
    223197G_MODULE_EXPORT void remove_chat_buddy( struct groupchat *b, char *handle, char *reason );
    224 
    225 /* prpl.c */
    226 G_MODULE_EXPORT void show_got_added( struct im_connection *ic, char *handle, const char *realname );
    227 
    228 /* server.c */
    229 G_MODULE_EXPORT void serv_got_update( struct im_connection *ic, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps );
    230 G_MODULE_EXPORT void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len );
    231 G_MODULE_EXPORT void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type );
    232198G_MODULE_EXPORT void serv_got_chat_invite( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );
    233199G_MODULE_EXPORT struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle );
    234200G_MODULE_EXPORT void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime );
    235201G_MODULE_EXPORT void serv_got_chat_left( struct groupchat *c );
    236 
    237202struct groupchat *chat_by_channel( char *channel );
    238203struct groupchat *chat_by_id( int id );
    239204
     205/* Buddy management */
     206G_MODULE_EXPORT void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname );
     207G_MODULE_EXPORT struct buddy *find_buddy( struct im_connection *ic, char *handle );
     208G_MODULE_EXPORT void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname );
     209
     210/* Buddy activity */
     211G_MODULE_EXPORT void serv_got_update( struct im_connection *ic, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps );
     212G_MODULE_EXPORT void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len );
     213G_MODULE_EXPORT void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type );
     214
     215/* Actions, or whatever. */
     216int imc_set_away( struct im_connection *ic, char *away );
     217int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags );
     218int imc_chat_msg( struct groupchat *c, char *msg, int flags );
     219
     220void imc_add_allow( struct im_connection *ic, char *handle );
     221void imc_rem_allow( struct im_connection *ic, char *handle );
     222void imc_add_block( struct im_connection *ic, char *handle );
     223void imc_rem_block( struct im_connection *ic, char *handle );
     224
     225/* Misc. stuff */
     226char *set_eval_away_devoice( set_t *set, char *value );
     227gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond );
     228void cancel_auto_reconnect( struct account *a );
     229
    240230#endif
  • protocols/oscar/chat.c

    rc2fb3809 r84b045d  
    5454                        continue;
    5555                if (!cur->priv) {
    56                         imc_error(sess->aux_data, "chat connection with no name!");
     56                        imcb_error(sess->aux_data, "chat connection with no name!");
    5757                        continue;
    5858                }
     
    397397
    398398        if (detaillevel != 0x02) {
    399                 imc_error(sess->aux_data, "Only detaillevel 0x2 is support at the moment");
     399                imcb_error(sess->aux_data, "Only detaillevel 0x2 is support at the moment");
    400400                return 1;
    401401        }
     
    615615
    616616        if (channel != 0x0003) {
    617                 imc_error(sess->aux_data, "unknown channel!");
     617                imcb_error(sess->aux_data, "unknown channel!");
    618618                return 0;
    619619        }
  • protocols/oscar/chatnav.c

    rc2fb3809 r84b045d  
    286286
    287287        if (!(bigblock = aim_gettlv(tlvlist, 0x0004, 1))) {
    288                 imc_error(sess->aux_data, "no bigblock in top tlv in create room response");
     288                imcb_error(sess->aux_data, "no bigblock in top tlv in create room response");
    289289       
    290290                aim_freetlvchain(&tlvlist);
     
    301301
    302302        if (detaillevel != 0x02) {
    303                 imc_error(sess->aux_data, "unknown detaillevel in create room response");
     303                imcb_error(sess->aux_data, "unknown detaillevel in create room response");
    304304                aim_freetlvchain(&tlvlist);
    305305                g_free(ck);
     
    367367
    368368        if (!(snac2 = aim_remsnac(sess, snac->id))) {
    369                 imc_error(sess->aux_data, "received response to unknown request!");
     369                imcb_error(sess->aux_data, "received response to unknown request!");
    370370                return 0;
    371371        }
    372372
    373373        if (snac2->family != 0x000d) {
    374                 imc_error(sess->aux_data, "recieved response that maps to corrupt request!");
     374                imcb_error(sess->aux_data, "recieved response that maps to corrupt request!");
    375375                return 0;
    376376        }
     
    389389                ret = parseinfo_create(sess, mod, rx, snac, bs, snac2);
    390390        else
    391                 imc_error(sess->aux_data, "unknown request subtype");
     391                imcb_error(sess->aux_data, "unknown request subtype");
    392392
    393393        if (snac2)
  • protocols/oscar/icq.c

    rc2fb3809 r84b045d  
    240240        if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) {
    241241                aim_freetlvchain(&tl);
    242                 imc_error(sess->aux_data, "corrupt ICQ response\n");
     242                imcb_error(sess->aux_data, "corrupt ICQ response\n");
    243243                return 0;
    244244        }
  • protocols/oscar/im.c

    rc2fb3809 r84b045d  
    937937
    938938        if (channel != 0x01) {
    939                 imc_error(sess->aux_data, "icbm: ICBM recieved on unsupported channel.  Ignoring.");
     939                imcb_error(sess->aux_data, "icbm: ICBM recieved on unsupported channel.  Ignoring.");
    940940                return 0;
    941941        }
     
    13451345
    13461346                } else {
    1347                         // imc_error(sess->aux_data, "Unknown TLV encountered");
     1347                        // imcb_error(sess->aux_data, "Unknown TLV encountered");
    13481348                }
    13491349
     
    15171517        cookie2 = aimbs_getraw(&bbs, 8);
    15181518        if (memcmp(cookie, cookie2, 8) != 0)
    1519                 imc_error(sess->aux_data, "rend: warning cookies don't match!");
     1519                imcb_error(sess->aux_data, "rend: warning cookies don't match!");
    15201520        memcpy(args.cookie, cookie2, 8);
    15211521        g_free(cookie2);
     
    17831783        } else {
    17841784
    1785                 imc_error(sess->aux_data, "ICBM received on an unsupported channel.  Ignoring.");
     1785                imcb_error(sess->aux_data, "ICBM received on an unsupported channel.  Ignoring.");
    17861786
    17871787                return 0;
  • protocols/oscar/info.c

    rc2fb3809 r84b045d  
    474474                         */
    475475#ifdef DEBUG
    476                         // imc_error(sess->aux_data, G_STRLOC);
     476                        // imcb_error(sess->aux_data, G_STRLOC);
    477477#endif
    478478
     
    635635
    636636        if (!origsnac || !origsnac->data) {
    637                 imc_error(sess->aux_data, "major problem: no snac stored!");
     637                imcb_error(sess->aux_data, "major problem: no snac stored!");
    638638                return 0;
    639639        }
     
    644644                        (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE) &&
    645645                        (inforeq->infotype != AIM_GETINFO_CAPABILITIES)) {
    646                 imc_error(sess->aux_data, "unknown infotype in request!");
     646                imcb_error(sess->aux_data, "unknown infotype in request!");
    647647                return 0;
    648648        }
  • protocols/oscar/oscar.c

    rc2fb3809 r84b045d  
    267267                        if ((conn->type == AIM_CONN_TYPE_BOS) ||
    268268                                   !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) {
    269                                 imc_error(ic, _("Disconnected."));
     269                                imcb_error(ic, _("Disconnected."));
    270270                                imc_logout(ic, TRUE);
    271271                        } else if (conn->type == AIM_CONN_TYPE_CHAT) {
     
    277277                                c->fd = -1;
    278278                                aim_conn_kill(odata->sess, &conn);
    279                                 imc_error(sess->aux_data, _("You have been disconnected from chat room %s."), c->name);
     279                                imcb_error(sess->aux_data, _("You have been disconnected from chat room %s."), c->name);
    280280                        } else if (conn->type == AIM_CONN_TYPE_CHATNAV) {
    281281                                if (odata->cnpa > 0)
     
    288288                                                g_slist_remove(odata->create_rooms, cr);
    289289                                        g_free(cr);
    290                                         imc_error(sess->aux_data, _("Chat is currently unavailable"));
     290                                        imcb_error(sess->aux_data, _("Chat is currently unavailable"));
    291291                                }
    292292                                aim_conn_kill(odata->sess, &conn);
     
    325325
    326326        if (source < 0) {
    327                 imc_error(ic, _("Couldn't connect to host"));
     327                imcb_error(ic, _("Couldn't connect to host"));
    328328                imc_logout(ic, TRUE);
    329329                return FALSE;
     
    353353        aim_session_t *sess;
    354354        aim_conn_t *conn;
    355         struct im_connection *ic = imc_new(acc);
     355        struct im_connection *ic = imcb_new(acc);
    356356        struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1);
    357357
     
    380380        conn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, NULL);
    381381        if (conn == NULL) {
    382                 imc_error(ic, _("Unable to login to AIM"));
     382                imcb_error(ic, _("Unable to login to AIM"));
    383383                imc_logout(ic, TRUE);
    384384                return;
     
    386386       
    387387        if (acc->server == NULL) {
    388                 imc_error(ic, "No servername specified");
     388                imcb_error(ic, "No servername specified");
    389389                imc_logout(ic, FALSE);
    390390                return;
     
    393393        if (g_strcasecmp(acc->server, "login.icq.com") != 0 &&
    394394            g_strcasecmp(acc->server, "login.oscar.aol.com") != 0) {
    395                 imc_log(ic, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server);
    396         }
    397        
    398         imc_log(ic, _("Signon: %s"), ic->acc->user);
     395                imcb_log(ic, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server);
     396        }
     397       
     398        imcb_log(ic, _("Signon: %s"), ic->acc->user);
    399399
    400400        aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0);
     
    404404        conn->fd = proxy_connect(acc->server, AIM_LOGIN_PORT, oscar_login_connect, ic);
    405405        if (conn->fd < 0) {
    406                 imc_error(ic, _("Couldn't connect to host"));
     406                imcb_error(ic, _("Couldn't connect to host"));
    407407                imc_logout(ic, TRUE);
    408408                return;
     
    464464
    465465        if (source < 0) {
    466                 imc_error(ic, _("Could Not Connect"));
     466                imcb_error(ic, _("Could Not Connect"));
    467467                imc_logout(ic, TRUE);
    468468                return FALSE;
     
    472472        ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ,
    473473                        oscar_callback, bosconn);
    474         imc_log(ic, _("Connection established, cookie sent"));
     474        imcb_log(ic, _("Connection established, cookie sent"));
    475475       
    476476        return FALSE;
     
    495495                case 0x05:
    496496                        /* Incorrect nick/password */
    497                         imc_error(ic, _("Incorrect nickname or password."));
     497                        imcb_error(ic, _("Incorrect nickname or password."));
    498498//                      plugin_event(event_error, (void *)980, 0, 0, 0);
    499499                        break;
    500500                case 0x11:
    501501                        /* Suspended account */
    502                         imc_error(ic, _("Your account is currently suspended."));
     502                        imcb_error(ic, _("Your account is currently suspended."));
    503503                        break;
    504504                case 0x18:
    505505                        /* connecting too frequently */
    506                         imc_error(ic, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
     506                        imcb_error(ic, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
    507507                        break;
    508508                case 0x1c:
    509509                        /* client too old */
    510                         imc_error(ic, _("The client version you are using is too old. Please upgrade at " WEBSITE));
     510                        imcb_error(ic, _("The client version you are using is too old. Please upgrade at " WEBSITE));
    511511                        break;
    512512                default:
    513                         imc_error(ic, _("Authentication Failed"));
     513                        imcb_error(ic, _("Authentication Failed"));
    514514                        break;
    515515                }
     
    523523        bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, NULL);
    524524        if (bosconn == NULL) {
    525                 imc_error(ic, _("Internal Error"));
     525                imcb_error(ic, _("Internal Error"));
    526526                od->killme = TRUE;
    527527                return 0;
     
    569569        g_free(host);
    570570        if (bosconn->fd < 0) {
    571                 imc_error(ic, _("Could Not Connect"));
     571                imcb_error(ic, _("Could Not Connect"));
    572572                od->killme = TRUE;
    573573                return 0;
     
    607607        }
    608608        if (in != '\n') {
    609                 imc_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."
     609                imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."
    610610                                " You may be disconnected shortly.");
    611611                b_event_remove(pos->inpa);
     
    630630
    631631        if (source < 0) {
    632                 imc_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."
     632                imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."
    633633                                " You may be disconnected shortly.");
    634634                if (pos->modname)
     
    708708                        g_free(pos->modname);
    709709                g_free(pos);
    710                 imc_error(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM."
     710                imcb_error(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM."
    711711                                " You may be disconnected shortly.");
    712712        }
     
    11121112                inv->name = g_strdup(name);
    11131113               
    1114                 do_ask_dialog( ic, txt, inv, oscar_accept_chat, oscar_reject_chat);
     1114                imcb_ask( ic, txt, inv, oscar_accept_chat, oscar_reject_chat);
    11151115       
    11161116                if (name)
     
    11301130        // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message);
    11311131        if(find_buddy(data->ic, uin) == NULL)
    1132                 show_got_added(data->ic, uin, NULL);
     1132                imcb_ask_add(data->ic, uin, NULL);
    11331133       
    11341134        g_free(uin);
     
    11641164        data->ic = ic;
    11651165        data->uin = uin;
    1166         do_ask_dialog(ic, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny);
     1166        imcb_ask(ic, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny);
    11671167        g_free(dialog_msg);
    11681168}
     
    12071207
    12081208                case 0x0007: { /* Someone has denied you authorization */
    1209                         imc_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );
     1209                        imcb_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );
    12101210                } break;
    12111211
    12121212                case 0x0008: { /* Someone has granted you authorization */
    1213                         imc_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );
     1213                        imcb_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );
    12141214                } break;
    12151215
     
    12771277                case 0:
    12781278                        /* Invalid (0) */
    1279                         imc_error(sess->aux_data,
     1279                        imcb_error(sess->aux_data,
    12801280                                   nummissed == 1 ?
    12811281                                   _("You missed %d message from %s because it was invalid.") :
     
    12861286                case 1:
    12871287                        /* Message too large */
    1288                         imc_error(sess->aux_data,
     1288                        imcb_error(sess->aux_data,
    12891289                                   nummissed == 1 ?
    12901290                                   _("You missed %d message from %s because it was too large.") :
     
    12951295                case 2:
    12961296                        /* Rate exceeded */
    1297                         imc_error(sess->aux_data,
     1297                        imcb_error(sess->aux_data,
    12981298                                   nummissed == 1 ?
    12991299                                   _("You missed %d message from %s because the rate limit has been exceeded.") :
     
    13041304                case 3:
    13051305                        /* Evil Sender */
    1306                         imc_error(sess->aux_data,
     1306                        imcb_error(sess->aux_data,
    13071307                                   nummissed == 1 ?
    13081308                                   _("You missed %d message from %s because it was too evil.") :
     
    13131313                case 4:
    13141314                        /* Evil Receiver */
    1315                         imc_error(sess->aux_data,
     1315                        imcb_error(sess->aux_data,
    13161316                                   nummissed == 1 ?
    13171317                                   _("You missed %d message from %s because you are too evil.") :
     
    13211321                        break;
    13221322                default:
    1323                         imc_error(sess->aux_data,
     1323                        imcb_error(sess->aux_data,
    13241324                                   nummissed == 1 ?
    13251325                                   _("You missed %d message from %s for unknown reasons.") :
     
    13411341        va_end(ap);
    13421342
    1343         imc_error(sess->aux_data, _("SNAC threw error: %s"),
     1343        imcb_error(sess->aux_data, _("SNAC threw error: %s"),
    13441344                  reason < msgerrreasonlen ? msgerrreason[reason] : "Unknown error");
    13451345
     
    13571357        va_end(ap);
    13581358
    1359         imc_error(sess->aux_data, _("Your message to %s did not get sent: %s"), destn,
     1359        imcb_error(sess->aux_data, _("Your message to %s did not get sent: %s"), destn,
    13601360                        (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown"));
    13611361
     
    13731373        va_end(ap);
    13741374
    1375         imc_error(sess->aux_data, _("User information for %s unavailable: %s"), destn,
     1375        imcb_error(sess->aux_data, _("User information for %s unavailable: %s"), destn,
    13761376                        (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown"));
    13771377
     
    13901390
    13911391        if (id < 4)
    1392                 imc_error(sess->aux_data, _("Your connection may be lost."));
     1392                imcb_error(sess->aux_data, _("Your connection may be lost."));
    13931393
    13941394        return 1;
     
    15841584                aim_conn_setlatency(fr->conn, windowsize/4);
    15851585        } else if (code == AIM_RATE_CODE_LIMIT) {
    1586                 imc_error(sess->aux_data, _("The last message was not sent because you are over the rate limit. "
     1586                imcb_error(sess->aux_data, _("The last message was not sent because you are over the rate limit. "
    15871587                          "Please wait 10 seconds and try again."));
    15881588                aim_conn_setlatency(fr->conn, windowsize/2);
     
    17891789
    17901790                case 0x0007: { /* Someone has denied you authorization */
    1791                         imc_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );
     1791                        imcb_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );
    17921792                } break;
    17931793
    17941794                case 0x0008: { /* Someone has granted you authorization */
    1795                         imc_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );
     1795                        imcb_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );
    17961796                } break;
    17971797
     
    19061906
    19071907        if (od->rights.maxawaymsglen == 0)
    1908                 imc_error(ic, "oscar_set_away_aim called before locate rights received");
     1908                imcb_error(ic, "oscar_set_away_aim called before locate rights received");
    19091909
    19101910        aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL);
     
    19201920
    19211921        if (strlen(message) > od->rights.maxawaymsglen) {
    1922                 imc_error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen);
     1922                imcb_error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen);
    19231923        }
    19241924
     
    20842084       
    20852085        /* Now that we have a buddy list, we can tell BitlBee that we're online. */
    2086         imc_connected(ic);
     2086        imcb_connected(ic);
    20872087       
    20882088        return 1;
     
    21062106                {
    21072107                        /* Hmm, the length should be even... */
    2108                         imc_error( sess->aux_data, "Received SSI ACK package with non-even length");
     2108                        imcb_error( sess->aux_data, "Received SSI ACK package with non-even length");
    21092109                        return( 0 );
    21102110                }
     
    21172117                        if( st == 0x0E )
    21182118                        {
    2119                                 imc_log( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list );
     2119                                imcb_log( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list );
    21202120                               
    21212121                                aim_ssi_auth_request( sess, fr->conn, list, "" );
     
    23032303        }
    23042304
    2305                 imc_log(ic, "%s\n%s", _("User Info"), str->str);
     2305                imcb_log(ic, "%s\n%s", _("User Info"), str->str);
    23062306        g_string_free(str, TRUE);
    23072307
     
    23972397                        idletime.tm_sec = 0;
    23982398                        strftime(buff, 256, _("%d days %H hours %M minutes"), &idletime);
    2399                         imc_log(ic, "%s: %s", _("Idle Time"), buff);
     2399                        imcb_log(ic, "%s: %s", _("Idle Time"), buff);
    24002400                }
    24012401               
    24022402                if(text) {
    24032403                        utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length);
    2404                         imc_log(ic, "%s\n%s", _("User Info"), utf8);
     2404                        imcb_log(ic, "%s\n%s", _("User Info"), utf8);
    24052405                } else {
    2406                         imc_log(ic, _("No user info available."));
     2406                        imcb_log(ic, _("No user info available."));
    24072407                }
    24082408        } else if(infotype == AIM_GETINFO_AWAYMESSAGE && userinfo->flags & AIM_FLAG_AWAY) {
    24092409                utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length);
    2410                 imc_log(ic, "%s\n%s", _("Away Message"), utf8);
     2410                imcb_log(ic, "%s\n%s", _("Away Message"), utf8);
    24112411        }
    24122412
  • protocols/oscar/rxqueue.c

    rc2fb3809 r84b045d  
    392392                aim_bstream_rewind(&flaphdr);
    393393                start = aimbs_get8(&flaphdr);
    394                 imc_error(sess->aux_data, "FLAP framing disrupted");
     394                imcb_error(sess->aux_data, "FLAP framing disrupted");
    395395                aim_conn_close(conn);
    396396                return -1;
  • protocols/oscar/search.c

    rc2fb3809 r84b045d  
    3939        /* XXX the modules interface should have already retrieved this for us */
    4040        if (!(snac2 = aim_remsnac(sess, snac->id))) {
    41                 imc_error(sess->aux_data, "couldn't get snac");
     41                imcb_error(sess->aux_data, "couldn't get snac");
    4242                return 0;
    4343        }
  • protocols/oscar/service.c

    rc2fb3809 r84b045d  
    567567                group = aimbs_get16(bs);
    568568
    569                 imc_error(sess->aux_data, "bifurcated migration unsupported");
     569                imcb_error(sess->aux_data, "bifurcated migration unsupported");
    570570        }
    571571
     
    894894*/
    895895                } else
    896                         imc_error(sess->aux_data, "WARNING: unknown hash request");
     896                        imcb_error(sess->aux_data, "WARNING: unknown hash request");
    897897
    898898        }
  • protocols/oscar/txqueue.c

    rc2fb3809 r84b045d  
    3030
    3131        if (!conn) {
    32                 imc_error(sess->aux_data, "no connection specified");
     32                imcb_error(sess->aux_data, "no connection specified");
    3333                return NULL;
    3434        }
     
    4646
    4747        } else
    48                 imc_error(sess->aux_data, "unknown framing");
     48                imcb_error(sess->aux_data, "unknown framing");
    4949
    5050        if (datalen > 0) {
     
    8080
    8181        if (!fr->conn) {
    82                 imc_error(sess->aux_data, "WARNING: enqueueing packet with no connection");
     82                imcb_error(sess->aux_data, "WARNING: enqueueing packet with no connection");
    8383                fr->conn = aim_getconn_type(sess, AIM_CONN_TYPE_BOS);
    8484        }
     
    120120
    121121        if (!fr->conn) {
    122                 imc_error(sess->aux_data, "packet has no connection");
     122                imcb_error(sess->aux_data, "packet has no connection");
    123123                aim_frame_destroy(fr);
    124124                return 0;
  • protocols/yahoo/yahoo.c

    rc2fb3809 r84b045d  
    123123static void byahoo_login( account_t *acc )
    124124{
    125         struct im_connection *ic = imc_new( acc );
     125        struct im_connection *ic = imcb_new( acc );
    126126        struct byahoo_data *yd = ic->proto_data = g_new0( struct byahoo_data, 1 );
    127127       
     
    129129        yd->current_status = YAHOO_STATUS_AVAILABLE;
    130130       
    131         imc_log( ic, "Connecting" );
     131        imcb_log( ic, "Connecting" );
    132132        yd->y2_id = yahoo_init( acc->user, acc->pass );
    133133        yahoo_login( yd->y2_id, yd->current_status );
     
    163163{
    164164        /* Just make an URL and let the user fetch the info */
    165         imc_log(ic, "%s\n%s: %s%s", _("User Info"),
     165        imcb_log(ic, "%s\n%s: %s%s", _("User Info"),
    166166                        _("For now, fetch yourself"), yahoo_get_profile_url(),
    167167                        who);
     
    510510        if( succ == YAHOO_LOGIN_OK )
    511511        {
    512                 imc_connected( ic );
     512                imcb_connected( ic );
    513513               
    514514                yd->logged_in = TRUE;
     
    538538               
    539539                if( url && *url )
    540                         imc_error( ic, "Error %d (%s). See %s for more information.", succ, errstr, url );
     540                        imcb_error( ic, "Error %d (%s). See %s for more information.", succ, errstr, url );
    541541                else
    542                         imc_error( ic, "Error %d (%s)", succ, errstr );
     542                        imcb_error( ic, "Error %d (%s)", succ, errstr );
    543543               
    544544                imc_logout( ic, allow_reconnect );
     
    605605        struct im_connection *ic = byahoo_get_ic_by_id( id );
    606606       
    607         imc_log( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who );
     607        imcb_log( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who );
    608608}
    609609
     
    625625        struct im_connection *ic = byahoo_get_ic_by_id( id );
    626626       
    627         imc_log( ic, "Yahoo! system message: %s", msg );
     627        imcb_log( ic, "Yahoo! system message: %s", msg );
    628628}
    629629
     
    632632        struct im_connection *ic = byahoo_get_ic_by_id( id );
    633633       
    634         imc_log( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from );
     634        imcb_log( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from );
    635635}
    636636
     
    639639        struct im_connection *ic = byahoo_get_ic_by_id( id );
    640640       
    641         imc_error( ic, "%s", err );
     641        imcb_error( ic, "%s", err );
    642642       
    643643        if( fatal )
     
    803803        g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", room, who, msg );
    804804       
    805         do_ask_dialog( ic, txt, inv, byahoo_accept_conf, byahoo_reject_conf );
     805        imcb_ask( ic, txt, inv, byahoo_accept_conf, byahoo_reject_conf );
    806806}
    807807
     
    810810        struct im_connection *ic = byahoo_get_ic_by_id( id );
    811811       
    812         imc_log( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg );
     812        imcb_log( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg );
    813813}
    814814
     
    893893       
    894894        if( from && subj )
    895                 imc_log( ic, "Received e-mail message from %s with subject `%s'", from, subj );
     895                imcb_log( ic, "Received e-mail message from %s with subject `%s'", from, subj );
    896896        else if( cnt > 0 )
    897                 imc_log( ic, "Received %d new e-mails", cnt );
     897                imcb_log( ic, "Received %d new e-mails", cnt );
    898898}
    899899
  • query.c

    rc2fb3809 r84b045d  
    122122       
    123123        if( count > 0 )
    124                 imc_log( ic, "Flushed %d unanswered question(s) for this connection.", count );
     124                imcb_log( ic, "Flushed %d unanswered question(s) for this connection.", count );
    125125       
    126126        q = query_default( irc );
     
    140140        if( ans )
    141141        {
    142                 imc_log( q->ic, "Accepted: %s", q->question );
     142                imcb_log( q->ic, "Accepted: %s", q->question );
    143143                q->yes( NULL, q->data );
    144144        }
    145145        else
    146146        {
    147                 imc_log( q->ic, "Rejected: %s", q->question );
     147                imcb_log( q->ic, "Rejected: %s", q->question );
    148148                q->no( NULL, q->data );
    149149        }
     
    160160        if( q->ic )
    161161        {
    162                 imc_log( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question );
     162                imcb_log( q->ic, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question );
    163163        }
    164164        else
  • root_commands.c

    rc2fb3809 r84b045d  
    634634        else
    635635        {
    636                 bim_rem_allow( ic, cmd[2] );
    637                 bim_add_block( ic, cmd[2] );
     636                imc_rem_allow( ic, cmd[2] );
     637                imc_add_block( ic, cmd[2] );
    638638                irc_usermsg( irc, "Buddy `%s' moved from your allow- to your block-list", cmd[2] );
    639639        }
     
    693693        else
    694694        {
    695                 bim_rem_block( ic, cmd[2] );
    696                 bim_add_allow( ic, cmd[2] );
     695                imc_rem_block( ic, cmd[2] );
     696                imc_add_allow( ic, cmd[2] );
    697697               
    698698                irc_usermsg( irc, "Buddy `%s' moved from your block- to your allow-list", cmd[2] );
Note: See TracChangeset for help on using the changeset viewer.