Changes in root_commands.c [3183c21:f536a99]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r3183c21 rf536a99 131 131 static void cmd_identify( irc_t *irc, char **cmd ) 132 132 { 133 storage_status_t status = storage_load( irc , cmd[1]);133 storage_status_t status = storage_load( irc->nick, cmd[1], irc ); 134 134 char *account_on[] = { "account", "on", NULL }; 135 135 … … 143 143 case STORAGE_OK: 144 144 irc_usermsg( irc, "Password accepted, settings and accounts loaded" ); 145 irc_setpass( irc, cmd[1] );146 irc->status |= USTATUS_IDENTIFIED;147 145 irc_umode_set( irc, "+R", 1 ); 148 146 if( set_getbool( &irc->set, "auto_connect" ) ) … … 164 162 } 165 163 166 switch( storage_save( irc, cmd[1], FALSE ) ) { 164 irc_setpass( irc, cmd[1] ); 165 switch( storage_save( irc, FALSE )) { 167 166 case STORAGE_ALREADY_EXISTS: 168 167 irc_usermsg( irc, "Nick is already registered" ); … … 171 170 case STORAGE_OK: 172 171 irc_usermsg( irc, "Account successfully created" ); 173 irc_setpass( irc, cmd[1] );174 172 irc->status |= USTATUS_IDENTIFIED; 175 173 irc_umode_set( irc, "+R", 1 ); … … 889 887 static void cmd_save( irc_t *irc, char **cmd ) 890 888 { 891 if( ( irc->status & USTATUS_IDENTIFIED ) == 0 ) 892 irc_usermsg( irc, "Please create an account first" ); 893 else if( storage_save( irc, NULL, TRUE ) == STORAGE_OK ) 889 if( storage_save( irc, TRUE ) == STORAGE_OK ) 894 890 irc_usermsg( irc, "Configuration saved" ); 895 891 else
Note: See TracChangeset
for help on using the changeset viewer.