From 79e826a028f4b4c62c0c16e20af1fb13a9636324 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 15 Jun 2006 14:22:17 +0200 Subject: Converted irc->status to binary flags. (This also fixes auto-save-on-quit that broke because of USTATUS_SHUTDOWN. :-( ) --- root_commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 0e12e9ab..d8611347 100644 --- a/root_commands.c +++ b/root_commands.c @@ -162,7 +162,7 @@ static void cmd_register( irc_t *irc, char **cmd ) break; case STORAGE_OK: - irc->status = USTATUS_IDENTIFIED; + irc->status |= USTATUS_IDENTIFIED; irc_umode_set( irc, "+R", 1 ); break; @@ -186,7 +186,7 @@ static void cmd_drop( irc_t *irc, char **cmd ) break; case STORAGE_OK: irc_setpass( irc, NULL ); - irc->status = USTATUS_LOGGED_IN; + irc->status &= ~USTATUS_IDENTIFIED; irc_umode_set( irc, "-R", 1 ); irc_usermsg( irc, "Account `%s' removed", irc->nick ); break; @@ -200,7 +200,7 @@ static void cmd_account( irc_t *irc, char **cmd ) { account_t *a; - if( global.conf->authmode == AUTHMODE_REGISTERED && irc->status < USTATUS_IDENTIFIED ) + if( global.conf->authmode == AUTHMODE_REGISTERED && ! irc->status & USTATUS_IDENTIFIED ) { irc_usermsg( irc, "This server only accepts registered users" ); return; -- cgit v1.2.3