Changeset b99296f for root_commands.c
- Timestamp:
- 2008-09-07T17:13:49Z (16 years ago)
- Branches:
- master
- Children:
- 92e90b7
- Parents:
- 0a4f6f4 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r0a4f6f4 rb99296f 131 131 static void cmd_identify( irc_t *irc, char **cmd ) 132 132 { 133 storage_status_t status = storage_load( irc ->nick, cmd[1], irc);133 storage_status_t status = storage_load( irc, cmd[1] ); 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; 145 147 irc_umode_set( irc, "+R", 1 ); 146 148 if( set_getbool( &irc->set, "auto_connect" ) ) … … 162 164 } 163 165 164 irc_setpass( irc, cmd[1] ); 165 switch( storage_save( irc, FALSE )) { 166 switch( storage_save( irc, cmd[1], FALSE ) ) { 166 167 case STORAGE_ALREADY_EXISTS: 167 168 irc_usermsg( irc, "Nick is already registered" ); … … 170 171 case STORAGE_OK: 171 172 irc_usermsg( irc, "Account successfully created" ); 173 irc_setpass( irc, cmd[1] ); 172 174 irc->status |= USTATUS_IDENTIFIED; 173 175 irc_umode_set( irc, "+R", 1 ); … … 887 889 static void cmd_save( irc_t *irc, char **cmd ) 888 890 { 889 if( storage_save( irc, TRUE ) == STORAGE_OK ) 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 ) 890 894 irc_usermsg( irc, "Configuration saved" ); 891 895 else
Note: See TracChangeset
for help on using the changeset viewer.