2008-09-26 17:17:57 -04:00
|
|
|
$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)
|
2008-03-22 19:06:50 -04:00
|
|
|
TRUE, NULL);
|
2003-08-18 23:52:27 -04:00
|
|
|
|
|
|
|
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)) {
|
2008-03-22 19:06:50 -04:00
|
|
|
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
|
2008-09-26 17:17:57 -04:00
|
|
|
@@ -3621,7 +3623,9 @@ SILC_SERVER_CMD_FUNC(cumode)
|
2003-08-18 23:52:27 -04:00
|
|
|
/* Promote to operator */
|
|
|
|
if (!(chl->mode & SILC_CHANNEL_UMODE_CHANOP)) {
|
2003-10-28 23:12:47 -05:00
|
|
|
if (!(sender_mask & SILC_CHANNEL_UMODE_CHANOP) &&
|
2003-08-18 23:52:27 -04:00
|
|
|
- !(sender_mask & SILC_CHANNEL_UMODE_CHANFO)) {
|
|
|
|
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
|
|
|
|
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
|
2003-10-28 23:12:47 -05:00
|
|
|
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
|
2008-03-22 19:06:50 -04:00
|
|
|
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
|
|
|
|
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
|
2003-10-28 23:12:47 -05:00
|
|
|
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
|
2008-09-26 17:17:57 -04:00
|
|
|
@@ -3635,7 +3639,9 @@ SILC_SERVER_CMD_FUNC(cumode)
|
2003-08-18 23:52:27 -04:00
|
|
|
} 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) &&
|
2003-10-28 23:12:47 -05:00
|
|
|
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
|
2008-03-22 19:06:50 -04:00
|
|
|
tmp_ch_id = silc_argument_get_arg_type(cmd->args, 1, &tmp_ch_len);
|
2003-10-28 23:12:47 -05:00
|
|
|
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
|
|
|
|
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
|