Changeset 0da65d5 for irc.c


Ignore:
Timestamp:
2007-03-31T05:40:45Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
aef4828
Parents:
fa29d093
Message:

s/gaim_connection/im_connection/ and some other minor API changes. The rest
will come tomorrow. It compiles, I'll leave the real testing up to someone
else. ;-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rfa29d093 r0da65d5  
    230230       
    231231        for (account = irc->accounts; account; account = account->next) {
    232                 if (account->gc) {
    233                         account->gc->wants_to_die = TRUE;
    234                         signoff(account->gc);
     232                if (account->ic) {
     233                        account->ic->wants_to_die = TRUE;
     234                        signoff(account->ic);
    235235                } else if (account->reconnect) {
    236236                        cancel_auto_reconnect(account);
     
    256256       
    257257        while (irc->accounts)
    258                 if (irc->accounts->gc == NULL)
     258                if (irc->accounts->ic == NULL)
    259259                        account_del(irc, irc->accounts);
    260260                else
     
    633633        user_t *u;
    634634        char namelist[385] = "";
    635         struct conversation *c = NULL;
     635        struct groupchat *c = NULL;
    636636        char *ops = set_getstr( &irc->set, "ops" );
    637637       
     
    649649                        }
    650650                       
    651                         if( u->gc && !u->away && set_getbool( &irc->set, "away_devoice" ) )
     651                        if( u->ic && !u->away && set_getbool( &irc->set, "away_devoice" ) )
    652652                                strcat( namelist, "+" );
    653653                        else if( ( strcmp( u->nick, irc->mynick ) == 0 && ( strcmp( ops, "root" ) == 0 || strcmp( ops, "both" ) == 0 ) ) ||
     
    668668                                                 strcmp( ops, "user" ) == 0 || strcmp( ops, "both" ) ? "@" : "", irc->nick );
    669669               
    670                 for( l = c->in_room; l; l = l->next ) if( ( u = user_findhandle( c->gc, l->data ) ) )
     670                for( l = c->in_room; l; l = l->next ) if( ( u = user_findhandle( c->ic, l->data ) ) )
    671671                {
    672672                        if( strlen( namelist ) + strlen( u->nick ) > sizeof( namelist ) - 4 )
     
    812812        else
    813813        {
    814                 struct conversation *c = chat_by_channel( channel );
     814                struct groupchat *c = chat_by_channel( channel );
    815815               
    816816                if( c )
     
    911911        char reason[128];
    912912       
    913         if( u->gc && u->gc->flags & OPT_LOGGING_OUT )
    914         {
    915                 if( u->gc->acc->server )
     913        if( u->ic && u->ic->flags & OPT_LOGGING_OUT )
     914        {
     915                if( u->ic->acc->server )
    916916                        g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost,
    917                                     u->gc->acc->server );
    918                 else if( ( s = strchr( u->gc->username, '@' ) ) )
     917                                    u->ic->acc->server );
     918                else if( ( s = strchr( u->ic->username, '@' ) ) )
    919919                        g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost,
    920920                                    s + 1 );
    921921                else
    922922                        g_snprintf( reason, sizeof( reason ), "%s %s.%s", irc->myhost,
    923                                     u->gc->acc->prpl->name, irc->myhost );
     923                                    u->ic->acc->prpl->name, irc->myhost );
    924924               
    925925                /* proto_opt might contain garbage after the : */
     
    945945int irc_send( irc_t *irc, char *nick, char *s, int flags )
    946946{
    947         struct conversation *c = NULL;
     947        struct groupchat *c = NULL;
    948948        user_t *u = NULL;
    949949       
     
    997997                else if( g_strncasecmp( s + 1, "TYPING", 6 ) == 0 )
    998998                {
    999                         if( u && u->gc && u->gc->acc->prpl->send_typing && strlen( s ) >= 10 )
     999                        if( u && u->ic && u->ic->acc->prpl->send_typing && strlen( s ) >= 10 )
    10001000                        {
    10011001                                time_t current_typing_notice = time( NULL );
     
    10031003                                if( current_typing_notice - u->last_typing_notice >= 5 )
    10041004                                {
    1005                                         u->gc->acc->prpl->send_typing( u->gc, u->handle, s[8] == '1' );
     1005                                        u->ic->acc->prpl->send_typing( u->ic, u->handle, s[8] == '1' );
    10061006                                        u->last_typing_notice = current_typing_notice;
    10071007                                }
     
    10361036                }
    10371037        }
    1038         else if( c && c->gc && c->gc->acc && c->gc->acc->prpl )
    1039         {
    1040                 return( bim_chat_msg( c, s ) );
     1038        else if( c && c->ic && c->ic->acc && c->ic->acc->prpl )
     1039        {
     1040                return( bim_chat_msg( c, s, 0 ) );
    10411041        }
    10421042       
     
    10531053       
    10541054        u->sendbuf[u->sendbuf_len-2] = 0; /* Cut off the last newline */
    1055         bim_buddy_msg( u->gc, u->handle, u->sendbuf, u->sendbuf_flags );
     1055        bim_buddy_msg( u->ic, u->handle, u->sendbuf, u->sendbuf_flags );
    10561056       
    10571057        g_free( u->sendbuf );
     
    10661066void buddy_send_handler( irc_t *irc, user_t *u, char *msg, int flags )
    10671067{
    1068         if( !u || !u->gc ) return;
     1068        if( !u || !u->ic ) return;
    10691069       
    10701070        if( set_getbool( &irc->set, "buddy_sendbuffer" ) && set_getint( &irc->set, "buddy_sendbuffer_delay" ) > 0 )
     
    11051105        else
    11061106        {
    1107                 bim_buddy_msg( u->gc, u->handle, msg, flags );
     1107                bim_buddy_msg( u->ic, u->handle, msg, flags );
    11081108        }
    11091109}
Note: See TracChangeset for help on using the changeset viewer.