cb167113da
operator to give themselves operator status on any channel.
35 lines
1.8 KiB
Plaintext
35 lines
1.8 KiB
Plaintext
$OpenBSD: operops-patch-silcd_command_c,v 1.1 2003/08/19 03:52:27 jolan Exp $
|
|
--- silcd/command.c.orig 2003-03-17 11:01:53.000000000 -0600
|
|
+++ silcd/command.c 2003-08-18 17:45:58.000000000 -0500
|
|
@@ -3154,6 +3154,8 @@ SILC_SERVER_CMD_FUNC(cumode)
|
|
}
|
|
|
|
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_reply(cmd, SILC_COMMAND_CUMODE,
|
|
@@ -3261,7 +3263,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)) {
|
|
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CUMODE,
|
|
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
|
|
0);
|
|
@@ -3274,7 +3278,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_reply(cmd, SILC_COMMAND_CUMODE,
|
|
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
|
|
0);
|