Changeset 5898ef8 for irc.c


Ignore:
Timestamp:
2006-06-15T12:46:31Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
10efa91
Parents:
c121f89 (diff), 79e826a (diff), 3af70b0 (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:

xml_save(), decent error handling and merging fixed autosaving.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rc121f89 r5898ef8  
    177177        }
    178178       
    179         irc->status = USTATUS_SHUTDOWN;
     179        irc->status |= USTATUS_SHUTDOWN;
    180180        if( irc->sendbuffer && !immed )
    181181        {
     
    211211        log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd );
    212212       
    213         if( irc->status >= USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )
     213        if( irc->status & USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )
    214214                if( storage_save( irc, TRUE ) != STORAGE_OK )
    215215                        irc_usermsg( irc, "Error while saving settings!" );
     
    577577               
    578578        /* Don't try to write anything new anymore when shutting down. */
    579         if( irc->status == USTATUS_SHUTDOWN )
     579        if( irc->status & USTATUS_SHUTDOWN )
    580580                return;
    581581       
     
    707707        if( irc->user && irc->nick )
    708708        {
    709                 if( global.conf->authmode == AUTHMODE_CLOSED && irc->status < USTATUS_AUTHORIZED )
     709                if( global.conf->authmode == AUTHMODE_CLOSED && !( irc->status & USTATUS_AUTHORIZED ) )
    710710                {
    711711                        irc_reply( irc, 464, ":This server is password-protected." );
     
    764764                ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname );
    765765       
    766         irc->status = USTATUS_LOGGED_IN;
     766        irc->status |= USTATUS_LOGGED_IN;
    767767}
    768768
     
    11871187        int rv = 0;
    11881188       
    1189         if( irc->status < USTATUS_LOGGED_IN )
     1189        if( !( irc->status & USTATUS_LOGGED_IN ) )
    11901190        {
    11911191                if( gettime() > ( irc->last_pong + IRC_LOGIN_TIMEOUT ) )
Note: See TracChangeset for help on using the changeset viewer.