* Handler for the IRC "MODE" command.
*
* This function detects whether user or channel modes should be modified
- * and calls the apropriate sub-functions.
+ * and calls the appropriate sub-functions.
*
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
}
if (send_RPL_HOSTHIDDEN_MSG && Client_Conn(Target) > NONE) {
- /* A new (cloaked) hostname must be annoucned */
+ /* A new (cloaked) hostname must be announced */
IRC_WriteStrClientPrefix(Target, Origin,
RPL_HOSTHIDDEN_MSG,
Client_ID(Target),
Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
{
char the_modes[COMMAND_LEN], the_args[COMMAND_LEN], x[2],
- argadd[CLIENT_PASS_LEN], *mode_ptr, *o_mode_ptr;
+ argadd[CLIENT_PASS_LEN], *mode_ptr;
bool connected, set, skiponce, retval, use_servermode,
is_halfop, is_op, is_admin, is_owner, is_machine, is_oper;
int mode_arg, arg_arg, mode_arg_count = 0;
arg_arg = -1;
if(!is_machine && !is_oper) {
- o_mode_ptr = Channel_UserModes(Channel, Client);
- while( *o_mode_ptr ) {
- if ( *o_mode_ptr == 'q')
- is_owner = true;
- if ( *o_mode_ptr == 'a')
- is_admin = true;
- if ( *o_mode_ptr == 'o')
- is_op = true;
- if ( *o_mode_ptr == 'h')
- is_halfop = true;
- o_mode_ptr++;
- }
+ if (Channel_UserHasMode(Channel, Client, 'q'))
+ is_owner = true;
+ if (Channel_UserHasMode(Channel, Client, 'a'))
+ is_admin = true;
+ if (Channel_UserHasMode(Channel, Client, 'o'))
+ is_op = true;
+ if (Channel_UserHasMode(Channel, Client, 'h'))
+ is_halfop = true;
}
/* Validate modes */
}
/**
- * Delete entries from channel invite, ban and exeption lists.
+ * Delete entries from channel invite, ban and exception lists.
*
* @param what Can be 'I' for invite, 'b' for ban, and 'e' for exception list.
* @param Prefix The originator of the command.