Changeset 09adf08
- Timestamp:
- 2005-12-08T15:31:25Z (19 years ago)
- Branches:
- master
- Children:
- 7cad7b4
- Parents:
- 8efa2f4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r8efa2f4 r09adf08 86 86 int cmd_identify( irc_t *irc, char **cmd ) 87 87 { 88 int checkie= global.storage->load( irc->nick, cmd[1], irc );89 90 if( checkie == -1 )91 {88 storage_status_t status = global.storage->load( irc->nick, cmd[1], irc ); 89 90 switch (status) { 91 case STORAGE_INVALID_PASSWORD: 92 92 irc_usermsg( irc, "Incorrect password" ); 93 } 94 else if( checkie == 0 ) 95 { 93 break; 94 case STORAGE_NO_SUCH_USER: 96 95 irc_usermsg( irc, "The nick is (probably) not registered" ); 97 } 98 else if( checkie == 1 ) 99 { 96 break; 97 case STORAGE_OK: 100 98 irc_usermsg( irc, "Password accepted" ); 101 } 102 else 103 { 99 break; 100 default: 104 101 irc_usermsg( irc, "Something very weird happened" ); 102 break; 105 103 } 106 104 … … 618 616 int cmd_save( irc_t *irc, char **cmd ) 619 617 { 620 if( global.storage->save( irc, TRUE ) )618 if( global.storage->save( irc, TRUE ) == STORAGE_OK ) 621 619 irc_usermsg( irc, "Configuration saved" ); 622 620 else -
storage_text.c
r8efa2f4 r09adf08 277 277 fclose( fp ); 278 278 279 /*FIXME Test if password is correct*/279 /*FIXME: Check password */ 280 280 281 281 return STORAGE_OK;
Note: See TracChangeset
for help on using the changeset viewer.