set ? '+' : '-',
*mode_ptr);
x[0] = '\0';
- goto client_exit;
} else {
Log(LOG_DEBUG,
"Handling unknown mode \"%c%c\" from \"%s\" for \"%s\" ...",
strlcat(the_modes, x, sizeof(the_modes));
}
}
-client_exit:
/* Are there changed modes? */
if (the_modes[1]) {
case 'i': /* Invite only */
case 'm': /* Moderated */
case 'n': /* Only members can write */
+ case 'R': /* Registered users only */
case 's': /* Secret channel */
case 't': /* Topic locked */
case 'z': /* Secure connections only */
Channel_Name(Channel));
break;
/* --- Channel user modes --- */
+ case 'a':
+ case 'h':
+ case 'q':
+ if (Client_Type(Client) != CLIENT_SERVER) {
+ connected = IRC_WriteStrClient(Origin,
+ ERR_CHANOPRIVSNEEDED_MSG,
+ Client_ID(Origin),
+ Channel_Name(Channel));
+ goto chan_exit;
+ }
case 'o': /* Channel operator */
case 'v': /* Voice */
if (arg_arg > mode_arg) {
}
break;
default:
- Log(LOG_DEBUG,
- "Unknown mode \"%c%c\" from \"%s\" on %s!?",
- set ? '+' : '-', *mode_ptr, Client_ID(Origin),
- Channel_Name(Channel));
- if (Client_Type(Client) != CLIENT_SERVER)
+ if (Client_Type(Client) != CLIENT_SERVER) {
+ Log(LOG_DEBUG,
+ "Unknown mode \"%c%c\" from \"%s\" on %s!?",
+ set ? '+' : '-', *mode_ptr,
+ Client_ID(Origin), Channel_Name(Channel));
connected = IRC_WriteStrClient(Origin,
ERR_UMODEUNKNOWNFLAG2_MSG,
Client_ID(Origin),
set ? '+' : '-', *mode_ptr);
- x[0] = '\0';
- goto chan_exit;
- } /* switch() */
+ x[0] = '\0';
+ } else {
+ Log(LOG_DEBUG,
+ "Handling unknown mode \"%c%c\" from \"%s\" on %s ...",
+ set ? '+' : '-', *mode_ptr,
+ Client_ID(Origin), Channel_Name(Channel));
+ x[0] = *mode_ptr;
+ }
+ }
if (!connected)
break;