Ignore:
Timestamp:
2007-04-15T22:39:35Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
84b045d
Parents:
cd4723c
Message:

Cleaned up struct im_connection. No more username/password stuff since
it's in acc too. wants_to_die is now an argument to imc_logout().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    rcd4723c rc2fb3809  
    151151        ic = g_new0( struct im_connection, 1 );
    152152       
    153         /* Maybe we should get rid of this memory waste later. ;-) */
    154         g_snprintf( ic->username, sizeof( ic->username ), "%s", acc->user );
    155         g_snprintf( ic->password, sizeof( ic->password ), "%s", acc->pass );
    156        
    157153        ic->irc = acc->irc;
    158154        ic->acc = acc;
     
    201197        /* If we found one, include the screenname in the message. */
    202198        if( a )
    203                 irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->username, text );
     199                irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text );
    204200        else
    205201                irc_usermsg( ic->irc, "%s - %s", ic->acc->prpl->name, text );
     
    291287}
    292288
    293 void imc_logout( struct im_connection *ic )
     289void imc_logout( struct im_connection *ic, int allow_reconnect )
    294290{
    295291        irc_t *irc = ic->irc;
     
    333329                /* Uhm... This is very sick. */
    334330        }
    335         else if( !ic->wants_to_die && set_getbool( &irc->set, "auto_reconnect" ) &&
     331        else if( allow_reconnect && set_getbool( &irc->set, "auto_reconnect" ) &&
    336332                 set_getbool( &a->set, "auto_reconnect" ) )
    337333        {
     
    436432       
    437433        return( b );
    438 }
    439 
    440 void signoff_blocked( struct im_connection *ic )
    441 {
    442         return; /* Make all blocked users look invisible (TODO?) */
    443434}
    444435
     
    730721       
    731722        /* Gaim sends own messages through this too. IRC doesn't want this, so kill them */
    732         if( g_strcasecmp( who, ic->username ) == 0 )
     723        if( g_strcasecmp( who, ic->acc->user ) == 0 )
    733724                return;
    734725       
     
    781772       
    782773        /* It might be yourself! */
    783         if( b->ic->acc->prpl->handle_cmp( handle, b->ic->username ) == 0 )
     774        if( b->ic->acc->prpl->handle_cmp( handle, b->ic->acc->user ) == 0 )
    784775        {
    785776                u = user_find( b->ic->irc, b->ic->irc->nick );
     
    815806       
    816807        /* It might be yourself! */
    817         if( g_strcasecmp( handle, b->ic->username ) == 0 )
     808        if( g_strcasecmp( handle, b->ic->acc->user ) == 0 )
    818809        {
    819810                u = user_find( b->ic->irc, b->ic->irc->nick );
     
    958949{
    959950        char *buf = NULL;
    960         int st;
    961951       
    962952        if( ( c->ic->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
Note: See TracChangeset for help on using the changeset viewer.