Skip to content

Commit 23cda6f

Browse files
committed
Add chanop permission to admin_channel.py commands
1 parent 85d27aa commit 23cda6f

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

plugins/admin_channel.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@ def do_extban(char, text, text_inp, chan, conn, notice, nick, admin_log, adding=
6464
return True
6565

6666

67-
@hook.command(permissions=["op_ban", "op"])
67+
@hook.command(permissions=["op_ban", "op", "chanop"])
6868
def ban(text, conn, chan, notice, nick, admin_log):
6969
"""[channel] <user> - bans <user> in [channel], or in the caller's channel if no channel is specified"""
7070
mode_cmd("+b", "ban", text, chan, conn, notice, nick, admin_log)
7171

7272

73-
@hook.command(permissions=["op_ban", "op"])
73+
@hook.command(permissions=["op_ban", "op", "chanop"])
7474
def unban(text, conn, chan, notice, nick, admin_log):
7575
"""[channel] <user> - unbans <user> in [channel], or in the caller's channel if no channel is specified"""
7676
mode_cmd("-b", "unban", text, chan, conn, notice, nick, admin_log)
7777

7878

79-
@hook.command(permissions=["op_quiet", "op"])
79+
@hook.command(permissions=["op_quiet", "op", "chanop"])
8080
def quiet(text, conn, chan, notice, nick, admin_log):
8181
"""[channel] <user> - quiets <user> in [channel], or in the caller's channel if no channel is specified"""
8282
if mode_cmd("+q", "quiet", text, chan, conn, notice, nick, admin_log):
@@ -86,7 +86,7 @@ def quiet(text, conn, chan, notice, nick, admin_log):
8686
notice("Unable to set +q or a mute extban on this network.")
8787

8888

89-
@hook.command(permissions=["op_quiet", "op"])
89+
@hook.command(permissions=["op_quiet", "op", "chanop"])
9090
def unquiet(text, conn, chan, notice, nick, admin_log):
9191
"""[channel] <user> - unquiets <user> in [channel], or in the caller's channel if no channel is specified"""
9292
if mode_cmd("-q", "unquiet", text, chan, conn, notice, nick, admin_log):
@@ -96,31 +96,31 @@ def unquiet(text, conn, chan, notice, nick, admin_log):
9696
notice("Unable to unset +q or a mute extban on this network.")
9797

9898

99-
@hook.command(permissions=["op_voice", "op"])
99+
@hook.command(permissions=["op_voice", "op", "chanop"])
100100
def voice(text, conn, chan, notice, nick, admin_log):
101101
"""[channel] <user> - voices <user> in [channel], or in the caller's channel if no channel is specified"""
102102
mode_cmd("+v", "voice", text, chan, conn, notice, nick, admin_log)
103103

104104

105-
@hook.command(permissions=["op_voice", "op"])
105+
@hook.command(permissions=["op_voice", "op", "chanop"])
106106
def devoice(text, conn, chan, notice, nick, admin_log):
107107
"""[channel] <user> - devoices <user> in [channel], or in the caller's channel if no channel is specified"""
108108
mode_cmd("-v", "devoice", text, chan, conn, notice, nick, admin_log)
109109

110110

111-
@hook.command(permissions=["op_op", "op"])
111+
@hook.command(permissions=["op_op", "op", "chanop"])
112112
def op(text, conn, chan, notice, nick, admin_log):
113113
"""[channel] <user> - ops <user> in [channel], or in the caller's channel if no channel is specified"""
114114
mode_cmd("+o", "op", text, chan, conn, notice, nick, admin_log)
115115

116116

117-
@hook.command(permissions=["op_op", "op"])
117+
@hook.command(permissions=["op_op", "op", "chanop"])
118118
def deop(text, conn, chan, notice, nick, admin_log):
119119
"""[channel] <user> - deops <user> in [channel], or in the caller's channel if no channel is specified"""
120120
mode_cmd("-o", "deop", text, chan, conn, notice, nick, admin_log)
121121

122122

123-
@hook.command(permissions=["op_topic", "op"])
123+
@hook.command(permissions=["op_topic", "op", "chanop"])
124124
def topic(text, conn, chan, nick, admin_log):
125125
"""[channel] <topic> - changes the topic to <topic> in [channel], or in the caller's channel
126126
if no channel is specified"""
@@ -135,7 +135,7 @@ def topic(text, conn, chan, nick, admin_log):
135135
conn.send("TOPIC {} :{}".format(chan, msg))
136136

137137

138-
@hook.command(permissions=["op_kick", "op"])
138+
@hook.command(permissions=["op_kick", "op", "chanop"])
139139
def kick(text, chan, conn, notice, nick, admin_log):
140140
"""[channel] <user> - kicks <user> from [channel], or from the caller's channel if no channel is specified"""
141141
split = text.split(" ")
@@ -162,7 +162,7 @@ def kick(text, chan, conn, notice, nick, admin_log):
162162
conn.send(out)
163163

164164

165-
@hook.command(permissions=["op_rem", "op"])
165+
@hook.command(permissions=["op_rem", "op", "chanop"])
166166
def remove(text, chan, conn, nick, admin_log):
167167
"""<user> - force removes <user> from the caller's channel."""
168168
split = text.split(" ")
@@ -176,25 +176,25 @@ def remove(text, chan, conn, nick, admin_log):
176176
conn.send(out)
177177

178178

179-
@hook.command(permissions=["op_mute", "op"], autohelp=False)
179+
@hook.command(permissions=["op_mute", "op", "chanop"], autohelp=False)
180180
def mute(text, conn, chan, notice, nick, admin_log):
181181
"""[channel] - mutes [channel], or in the caller's channel if no channel is specified"""
182182
mode_cmd_no_target("+m", "mute", text, chan, conn, notice, nick, admin_log)
183183

184184

185-
@hook.command(permissions=["op_mute", "op"], autohelp=False)
185+
@hook.command(permissions=["op_mute", "op", "chanop"], autohelp=False)
186186
def unmute(text, conn, chan, notice, nick, admin_log):
187187
"""[channel] - unmutes [channel], or in the caller's channel if no channel is specified"""
188188
mode_cmd_no_target("-m", "unmute", text, chan, conn, notice, nick, admin_log)
189189

190190

191-
@hook.command(permissions=["op_lock", "op"], autohelp=False)
191+
@hook.command(permissions=["op_lock", "op", "chanop"], autohelp=False)
192192
def lock(text, conn, chan, notice, nick, admin_log):
193193
"""[channel] - locks [channel], or in the caller's channel if no channel is specified"""
194194
mode_cmd_no_target("+i", "lock", text, chan, conn, notice, nick, admin_log)
195195

196196

197-
@hook.command(permissions=["op_lock", "op"], autohelp=False)
197+
@hook.command(permissions=["op_lock", "op", "chanop"], autohelp=False)
198198
def unlock(text, conn, chan, notice, nick, admin_log):
199199
"""[channel] - unlocks [channel], or in the caller's channel if no channel is specified"""
200200
mode_cmd_no_target("-i", "unlock", text, chan, conn, notice, nick, admin_log)

0 commit comments

Comments
 (0)