Changeset 79e826a
- Timestamp:
- 2006-06-15T12:22:17Z (19 years ago)
- Branches:
- master
- Children:
- 3af70b0, 5898ef8
- Parents:
- 5a5c926
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r5a5c926 r79e826a 236 236 irc->w_watch_source_id = 0; 237 237 238 if( irc->status ==USTATUS_SHUTDOWN )238 if( irc->status & USTATUS_SHUTDOWN ) 239 239 irc_free( irc ); 240 240 -
ipc.c
r5a5c926 r79e826a 115 115 static void ipc_child_cmd_wallops( irc_t *irc, char **cmd ) 116 116 { 117 if( irc->status <USTATUS_LOGGED_IN )117 if( ! irc->status & USTATUS_LOGGED_IN ) 118 118 return; 119 119 … … 124 124 static void ipc_child_cmd_lilo( irc_t *irc, char **cmd ) 125 125 { 126 if( irc->status <USTATUS_LOGGED_IN )126 if( ! irc->status & USTATUS_LOGGED_IN ) 127 127 return; 128 128 … … 133 133 static void ipc_child_cmd_opermsg( irc_t *irc, char **cmd ) 134 134 { 135 if( irc->status <USTATUS_LOGGED_IN )135 if( ! irc->status & USTATUS_LOGGED_IN ) 136 136 return; 137 137 … … 154 154 static void ipc_child_cmd_kill( irc_t *irc, char **cmd ) 155 155 { 156 if( irc->status <USTATUS_LOGGED_IN )156 if( ! irc->status & USTATUS_LOGGED_IN ) 157 157 return; 158 158 … … 166 166 static void ipc_child_cmd_hello( irc_t *irc, char **cmd ) 167 167 { 168 if( irc->status <USTATUS_LOGGED_IN )168 if( ! irc->status & USTATUS_LOGGED_IN ) 169 169 ipc_to_master_str( "HELLO\r\n" ); 170 170 else -
irc.c
r5a5c926 r79e826a 179 179 } 180 180 181 irc->status = USTATUS_SHUTDOWN;181 irc->status |= USTATUS_SHUTDOWN; 182 182 if( irc->sendbuffer && !immed ) 183 183 { … … 213 213 log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); 214 214 215 if( irc->status >=USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )215 if( irc->status & USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) ) 216 216 if( storage_save( irc, TRUE ) != STORAGE_OK ) 217 217 irc_usermsg( irc, "Error while saving settings!" ); … … 701 701 if( irc->user && irc->nick ) 702 702 { 703 if( global.conf->authmode == AUTHMODE_CLOSED && irc->status <USTATUS_AUTHORIZED )703 if( global.conf->authmode == AUTHMODE_CLOSED && ! irc->status & USTATUS_AUTHORIZED ) 704 704 { 705 705 irc_reply( irc, 464, ":This server is password-protected." ); … … 758 758 ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); 759 759 760 irc->status = USTATUS_LOGGED_IN;760 irc->status |= USTATUS_LOGGED_IN; 761 761 } 762 762 … … 1181 1181 int rv = 0; 1182 1182 1183 if( irc->status <USTATUS_LOGGED_IN )1183 if( ! irc->status & USTATUS_LOGGED_IN ) 1184 1184 { 1185 1185 if( gettime() > ( irc->last_pong + IRC_LOGIN_TIMEOUT ) ) -
irc.h
r5a5c926 r79e826a 42 42 { 43 43 USTATUS_OFFLINE = 0, 44 USTATUS_AUTHORIZED ,45 USTATUS_LOGGED_IN ,46 USTATUS_IDENTIFIED ,47 USTATUS_SHUTDOWN = -144 USTATUS_AUTHORIZED = 1, 45 USTATUS_LOGGED_IN = 2, 46 USTATUS_IDENTIFIED = 4, 47 USTATUS_SHUTDOWN = 8 48 48 } irc_status_t; 49 49 -
irc_commands.c
r5a5c926 r79e826a 32 32 if( global.conf->auth_pass && strcmp( cmd[1], global.conf->auth_pass ) == 0 ) 33 33 { 34 irc->status = USTATUS_AUTHORIZED;34 irc->status |= USTATUS_AUTHORIZED; 35 35 irc_check_login( irc ); 36 36 } … … 610 610 for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --; 611 611 612 if( irc_commands[i].flags & IRC_CMD_PRE_LOGIN && irc->status >=USTATUS_LOGGED_IN )612 if( irc_commands[i].flags & IRC_CMD_PRE_LOGIN && irc->status & USTATUS_LOGGED_IN ) 613 613 { 614 614 irc_reply( irc, 462, ":Only allowed before logging in" ); 615 615 } 616 else if( irc_commands[i].flags & IRC_CMD_LOGGED_IN && irc->status <USTATUS_LOGGED_IN )616 else if( irc_commands[i].flags & IRC_CMD_LOGGED_IN && ! irc->status & USTATUS_LOGGED_IN ) 617 617 { 618 618 irc_reply( irc, 451, ":Register first" ); -
root_commands.c
r5a5c926 r79e826a 163 163 164 164 case STORAGE_OK: 165 irc->status = USTATUS_IDENTIFIED;165 irc->status |= USTATUS_IDENTIFIED; 166 166 irc_umode_set( irc, "+R", 1 ); 167 167 break; … … 187 187 case STORAGE_OK: 188 188 irc_setpass( irc, NULL ); 189 irc->status = USTATUS_LOGGED_IN;189 irc->status &= ~USTATUS_IDENTIFIED; 190 190 irc_umode_set( irc, "-R", 1 ); 191 191 irc_usermsg( irc, "Account `%s' removed", irc->nick ); … … 201 201 account_t *a; 202 202 203 if( global.conf->authmode == AUTHMODE_REGISTERED && irc->status <USTATUS_IDENTIFIED )203 if( global.conf->authmode == AUTHMODE_REGISTERED && ! irc->status & USTATUS_IDENTIFIED ) 204 204 { 205 205 irc_usermsg( irc, "This server only accepts registered users" ); -
storage_text.c
r5a5c926 r79e826a 71 71 user_t *ru = user_find( irc, ROOT_NICK ); 72 72 73 if( irc->status >=USTATUS_IDENTIFIED )73 if( irc->status & USTATUS_IDENTIFIED ) 74 74 return( 1 ); 75 75 … … 88 88 /* Do this now. If the user runs with AuthMode = Registered, the 89 89 account command will not work otherwise. */ 90 irc->status = USTATUS_IDENTIFIED;90 irc->status |= USTATUS_IDENTIFIED; 91 91 92 92 while( fscanf( fp, "%511[^\n]s", s ) > 0 )
Note: See TracChangeset
for help on using the changeset viewer.