Changeset 79e826a for irc.c


Ignore:
Timestamp:
2006-06-15T12:22:17Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
3af70b0, 5898ef8
Parents:
5a5c926
Message:

Converted irc->status to binary flags. (This also fixes auto-save-on-quit
that broke because of USTATUS_SHUTDOWN. :-( )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r5a5c926 r79e826a  
    179179        }
    180180       
    181         irc->status = USTATUS_SHUTDOWN;
     181        irc->status |= USTATUS_SHUTDOWN;
    182182        if( irc->sendbuffer && !immed )
    183183        {
     
    213213        log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd );
    214214       
    215         if( irc->status >= USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )
     215        if( irc->status & USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )
    216216                if( storage_save( irc, TRUE ) != STORAGE_OK )
    217217                        irc_usermsg( irc, "Error while saving settings!" );
     
    701701        if( irc->user && irc->nick )
    702702        {
    703                 if( global.conf->authmode == AUTHMODE_CLOSED && irc->status < USTATUS_AUTHORIZED )
     703                if( global.conf->authmode == AUTHMODE_CLOSED && ! irc->status & USTATUS_AUTHORIZED )
    704704                {
    705705                        irc_reply( irc, 464, ":This server is password-protected." );
     
    758758                ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname );
    759759       
    760         irc->status = USTATUS_LOGGED_IN;
     760        irc->status |= USTATUS_LOGGED_IN;
    761761}
    762762
     
    11811181        int rv = 0;
    11821182       
    1183         if( irc->status < USTATUS_LOGGED_IN )
     1183        if( ! irc->status & USTATUS_LOGGED_IN )
    11841184        {
    11851185                if( gettime() > ( irc->last_pong + IRC_LOGIN_TIMEOUT ) )
Note: See TracChangeset for help on using the changeset viewer.