openbsd-ports/net/silc-server/patches/operops-patch-apps_silcd_command_c

37 lines
1.8 KiB
Plaintext

$OpenBSD: operops-patch-apps_silcd_command_c,v 1.1 2005/09/09 20:08:54 brad Exp $
--- apps/silcd/command.c.orig Fri Sep 9 13:05:36 2005
+++ apps/silcd/command.c Fri Sep 9 13:08:28 2005
@@ -3431,6 +3431,8 @@ SILC_SERVER_CMD_FUNC(cumode)
client_id, 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)) {
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
@@ -3550,8 +3552,10 @@ 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)) {
- silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
+ silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
0, 2, tmp_ch_id, tmp_ch_len);
goto out;
@@ -3563,7 +3567,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)) {
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
0, 2, tmp_ch_id, tmp_ch_len);