openbsd-ports/net/silc-server/patches/operops-patch-apps_silcd_command_c
2008-09-26 21:17:57 +00:00

35 lines
1.7 KiB
Plaintext

$OpenBSD: operops-patch-apps_silcd_command_c,v 1.5 2008/09/26 21:17:57 brad Exp $
--- apps/silcd/command.c.orig Thu Sep 25 07:09:27 2008
+++ apps/silcd/command.c Thu Sep 25 13:24:09 2008
@@ -3498,6 +3498,8 @@ SILC_SERVER_CMD_FUNC(cumode)
TRUE, NULL);
if (target_client != client &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR) &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANOP)) {
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
@@ -3621,7 +3623,9 @@ SILC_SERVER_CMD_FUNC(cumode)
/* Promote to operator */
if (!(chl->mode & SILC_CHANNEL_UMODE_CHANOP)) {
if (!(sender_mask & SILC_CHANNEL_UMODE_CHANOP) &&
- !(sender_mask & SILC_CHANNEL_UMODE_CHANFO)) {
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
@@ -3635,7 +3639,9 @@ SILC_SERVER_CMD_FUNC(cumode)
} else {
if (chl->mode & SILC_CHANNEL_UMODE_CHANOP) {
if (!(sender_mask & SILC_CHANNEL_UMODE_CHANOP) &&
- !(sender_mask & SILC_CHANNEL_UMODE_CHANFO)) {
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,