Changeset 2cdd8ce for protocols/nogaim.c


Ignore:
Timestamp:
2005-11-19T15:17:03Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
9c8ae50, b20b32f
Parents:
c998255 (diff), 94281ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    rc998255 r2cdd8ce  
    184184                        gc->prpl->set_away( gc, s, away );
    185185                        if( set_getint( gc->irc, "debug" ) )
    186                                 irc_usermsg( gc->irc, "Setting away state for %s to %s", gc->prpl->name, s );
     186                                serv_got_crap( gc, "Setting away state to %s", s );
    187187                }
    188188                else
     
    277277void set_login_progress( struct gaim_connection *gc, int step, char *msg )
    278278{
    279         irc_usermsg( gc->irc, "%s(%s) - Logging in: %s", gc->prpl->name, gc->username, msg );
     279        serv_got_crap( gc, "Logging in: %s", msg );
    280280}
    281281
     
    283283void hide_login_progress( struct gaim_connection *gc, char *msg )
    284284{
    285         irc_usermsg( gc->irc, "%s(%s) - Login error: %s", gc->prpl->name, gc->username, msg );
     285        serv_got_crap( gc, "Login error: %s", msg );
    286286}
    287287
     
    289289void hide_login_progress_error( struct gaim_connection *gc, char *msg )
    290290{
    291         irc_usermsg( gc->irc, "%s(%s) - Logged out: %s", gc->prpl->name, gc->username, msg );
     291        serv_got_crap( gc, "Logged out: %s", msg );
    292292}
    293293
     
    308308                msg = text;
    309309       
    310         /* if( g_strcasecmp( set_getstr(gc->irc, "html" ), "strip" ) == 0 ) */
    311         if( gc->flags & OPT_CONN_HTML )
     310        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     311            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    312312                strip_html( msg );
    313313       
     
    337337        u = user_find( gc->irc, gc->irc->nick );
    338338       
    339         irc_usermsg( gc->irc, "%s(%s) - Logged in", gc->prpl->name, gc->username );
     339        serv_got_crap( gc, "Logged in" );
    340340       
    341341        gc->keepalive = g_timeout_add( 60000, send_keepalive, gc );
     
    351351               
    352352                if( u == NULL )
    353                         irc_usermsg( gc->irc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. "
     353                        serv_got_crap( gc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. "
    354354                                              "See \x02""help import_buddies\x02"" for more information." );
    355355        }
     
    384384        account_t *a;
    385385       
    386         irc_usermsg( gc->irc, "%s(%s) - Signing off..", gc->prpl->name, gc->username );
     386        serv_got_crap( gc, "Signing off.." );
    387387
    388388        gaim_input_remove( gc->keepalive );
     
    416416        {
    417417                int delay = set_getint( irc, "auto_reconnect_delay" );
    418                 irc_usermsg( gc->irc, "%s(%s) - Reconnecting in %d seconds..", gc->prpl->name, gc->username, delay);
     418                serv_got_crap( gc, "Reconnecting in %d seconds..", delay );
    419419               
    420420                a->reconnect = 1;
     
    430430void do_error_dialog( struct gaim_connection *gc, char *msg, char *title )
    431431{
    432         irc_usermsg( gc->irc, "%s(%s) - Error: %s", gc->prpl->name, gc->username, msg );
     432        serv_got_crap( gc, "Error: %s", msg );
    433433}
    434434
     
    459459       
    460460        if( set_getint( irc, "debug" ) && 0 ) /* This message is too useless */
    461                 irc_usermsg( irc, "Receiving user add from protocol: %s", handle );
     461                serv_got_crap( gc, "Receiving user add from handle: %s", handle );
    462462       
    463463        if( user_findhandle( gc, handle ) )
    464464        {
    465465                if( set_getint( irc, "debug" ) )
    466                         irc_usermsg( irc, "User already exists, ignoring add request: %s", handle );
     466                        serv_got_crap( gc, "User already exists, ignoring add request: %s", handle );
    467467               
    468468                return;
     
    557557               
    558558                if( ( gc->flags & OPT_LOGGED_IN ) && set_getint( gc->irc, "display_namechanges" ) )
    559                         irc_usermsg( gc->irc, "User `%s' changed name to `%s'", u->nick, u->realname );
     559                        serv_got_crap( gc, "User `%s' changed name to `%s'", u->nick, u->realname );
    560560        }
    561561}
     
    590590                        if( set_getint( gc->irc, "debug" ) || g_strcasecmp( set_getstr( gc->irc, "handle_unknown" ), "ignore" ) != 0 )
    591591                        {
    592                                 irc_usermsg( gc->irc, "serv_got_update() for handle %s on connection %s(%s):", handle, gc->prpl->name, gc->username );
    593                                 irc_usermsg( gc->irc, "loggedin = %d, type = %d", loggedin, type );
     592                                serv_got_crap( gc, "serv_got_update() for handle %s:", handle );
     593                                serv_got_crap( gc, "loggedin = %d, type = %d", loggedin, type );
    594594                        }
    595595                       
     
    671671                {
    672672                        if( set_getint( irc, "debug" ) )
    673                                 irc_usermsg( irc, "Ignoring message from unknown handle %s on connection %s(%s)", handle, gc->prpl->name, gc->username );
     673                                serv_got_crap( gc, "Ignoring message from unknown handle %s", handle );
    674674                       
    675675                        return;
     
    693693                else
    694694                {
    695                         irc_usermsg( irc, "Message from unknown handle %s on connection %s(%s):", handle, gc->prpl->name, gc->username );
     695                        serv_got_crap( gc, "Message from unknown handle %s:", handle );
    696696                        u = user_find( irc, irc->mynick );
    697697                }
    698698        }
    699699       
    700         /* if( g_strcasecmp( set_getstr( irc, "html" ), "strip" ) == 0 ) */
    701         if( gc->flags & OPT_CONN_HTML )
     700        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     701            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    702702                strip_html( msg );
    703703
     
    753753       
    754754        if( set_getint( gc->irc, "debug" ) )
    755                 irc_usermsg( gc->irc, "You were removed from conversation %d", (int) id );
     755                serv_got_crap( gc, "You were removed from conversation %d", (int) id );
    756756       
    757757        for( c = gc->conversations; c && c->id != id; c = (l=c)->next );
     
    798798        for( c = gc->conversations; c && c->id != id; c = c->next );
    799799       
    800         /* if( g_strcasecmp( set_getstr( gc->irc, "html" ), "strip" ) == 0 ) */
    801         if( gc->flags & OPT_CONN_HTML )
     800        if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) ||
     801            ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )
    802802                strip_html( msg );
    803803       
     
    809809                irc_privmsg( gc->irc, u, "PRIVMSG", c->channel, "", msg );
    810810        else
    811                 irc_usermsg( gc->irc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg );
     811                serv_got_crap( gc, "Message from/to conversation %s@%d (unknown conv/user): %s", who, id, msg );
    812812}
    813813
     
    832832       
    833833        s = g_new( char, 16 );
    834         sprintf( s, "#chat_%03d", gc->irc->c_id++ );
     834        sprintf( s, "&chat_%03d", gc->irc->c_id++ );
    835835        c->channel = g_strdup( s );
    836836        g_free( s );
    837837       
    838838        if( set_getint( gc->irc, "debug" ) )
    839                 irc_usermsg( gc->irc, "Creating new conversation: (id=%d,handle=%s)", id, handle );
     839                serv_got_crap( gc, "Creating new conversation: (id=%d,handle=%s)", id, handle );
    840840       
    841841        return( c );
     
    856856       
    857857        if( set_getint( b->gc->irc, "debug" ) )
    858                 irc_usermsg( b->gc->irc, "User %s added to conversation %d", handle, b->id );
     858                serv_got_crap( b->gc, "User %s added to conversation %d", handle, b->id );
    859859       
    860860        /* It might be yourself! */
     
    890890       
    891891        if( set_getint( b->gc->irc, "debug" ) )
    892                 irc_usermsg( b->gc->irc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" );
     892                serv_got_crap( b->gc, "User %s removed from conversation %d (%s)", handle, b->id, reason ? reason : "" );
    893893       
    894894        /* It might be yourself! */
     
    10311031                msg = buf;
    10321032
    1033         if( u->gc->flags & OPT_CONN_HTML) {
    1034                 char * html = escape_html(msg);
    1035                 strncpy(buf, html, 8192);
    1036                 g_free(html);
     1033        if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
     1034        {
     1035                char *html;
     1036               
     1037                html = escape_html( msg );
     1038                strncpy( buf, html, 8192 );
     1039                g_free( html );
     1040               
     1041                msg = buf;
    10371042        }
    10381043       
Note: See TracChangeset for help on using the changeset viewer.