Changeset ced1e17 for root_commands.c


Ignore:
Timestamp:
2008-09-07T14:34:50Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2bebe15
Parents:
d4810df (diff), ba3a8a5 (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:

Merging BitlBee 1.2.3 release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rd4810df rced1e17  
    140140static void cmd_identify( irc_t *irc, char **cmd )
    141141{
    142         storage_status_t status = storage_load( irc->nick, cmd[1], irc );
     142        storage_status_t status = storage_load( irc, cmd[1] );
    143143        char *account_on[] = { "account", "on", NULL };
    144144       
     
    152152        case STORAGE_OK:
    153153                irc_usermsg( irc, "Password accepted, settings and accounts loaded" );
     154                irc_setpass( irc, cmd[1] );
     155                irc->status |= USTATUS_IDENTIFIED;
    154156                irc_umode_set( irc, "+R", 1 );
    155157                if( set_getbool( &irc->set, "auto_connect" ) )
     
    171173        }
    172174
    173         irc_setpass( irc, cmd[1] );
    174         switch( storage_save( irc, FALSE )) {
     175        switch( storage_save( irc, cmd[1], FALSE ) ) {
    175176                case STORAGE_ALREADY_EXISTS:
    176177                        irc_usermsg( irc, "Nick is already registered" );
     
    179180                case STORAGE_OK:
    180181                        irc_usermsg( irc, "Account successfully created" );
     182                        irc_setpass( irc, cmd[1] );
    181183                        irc->status |= USTATUS_IDENTIFIED;
    182184                        irc_umode_set( irc, "+R", 1 );
     
    872874static void cmd_save( irc_t *irc, char **cmd )
    873875{
    874         if( storage_save( irc, TRUE ) == STORAGE_OK )
     876        if( ( irc->status & USTATUS_IDENTIFIED ) == 0 )
     877                irc_usermsg( irc, "Please create an account first" );
     878        else if( storage_save( irc, NULL, TRUE ) == STORAGE_OK )
    875879                irc_usermsg( irc, "Configuration saved" );
    876880        else
Note: See TracChangeset for help on using the changeset viewer.