From ab49fdcec9a09df839ec488e570672f2dd904dc7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 10 Dec 2005 15:50:49 +0100 Subject: Use helper functions rather then the backends directly. This will be used for transparent upgrade support later on. --- commands.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index 2877aa4b..7695d679 100644 --- a/commands.c +++ b/commands.c @@ -85,7 +85,7 @@ int cmd_help( irc_t *irc, char **cmd ) int cmd_identify( irc_t *irc, char **cmd ) { - storage_status_t status = global.storage->load( irc->nick, cmd[1], irc ); + storage_status_t status = storage_load( irc->nick, cmd[1], irc ); switch (status) { case STORAGE_INVALID_PASSWORD: @@ -114,7 +114,7 @@ int cmd_register( irc_t *irc, char **cmd ) } irc_setpass( irc, cmd[1] ); - switch( global.storage->save( irc, FALSE )) { + switch( storage_save( irc, FALSE )) { case STORAGE_ALREADY_EXISTS: irc_usermsg( irc, "Nick is already registered" ); break; @@ -135,7 +135,7 @@ int cmd_drop( irc_t *irc, char **cmd ) { storage_status_t status; - status = global.storage->remove (irc->nick, cmd[1]); + status = storage_remove (irc->nick, cmd[1]); switch (status) { case STORAGE_NO_SUCH_USER: irc_usermsg( irc, "That account does not exist" ); @@ -615,7 +615,7 @@ int cmd_set( irc_t *irc, char **cmd ) int cmd_save( irc_t *irc, char **cmd ) { - if( global.storage->save( irc, TRUE ) == STORAGE_OK ) + if( storage_save( irc, TRUE ) == STORAGE_OK ) irc_usermsg( irc, "Configuration saved" ); else irc_usermsg( irc, "Configuration could not be saved!" ); -- cgit v1.2.3