diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-06-15 14:22:17 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-06-15 14:22:17 +0200 |
commit | 79e826a028f4b4c62c0c16e20af1fb13a9636324 (patch) | |
tree | 5ddc446344fd7659ae847efc00f7ff70a8e3764a /root_commands.c | |
parent | 5a5c926ec0dffa4b28895929c092089c2a9b9d9f (diff) |
Converted irc->status to binary flags. (This also fixes auto-save-on-quit
that broke because of USTATUS_SHUTDOWN. :-( )
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |