added deop, voice and devoice to channel_op.py.
This commit is contained in:
parent
2fb299e9b7
commit
8dadd7d339
1 changed files with 15 additions and 0 deletions
|
@ -16,6 +16,15 @@ class Module(object):
|
||||||
bot.events.on("received").on("command").on("op"
|
bot.events.on("received").on("command").on("op"
|
||||||
).hook(self.op, channel_only=True, require_mode="o",
|
).hook(self.op, channel_only=True, require_mode="o",
|
||||||
min_args=1)
|
min_args=1)
|
||||||
|
bot.events.on("received").on("command").on("deop"
|
||||||
|
).hook(self.deop, channel_only=True, require_mode="o",
|
||||||
|
min_args=1)
|
||||||
|
bot.events.on("received").on("command").on("voice"
|
||||||
|
).hook(self.voice, channel_only=True, require_mode="o",
|
||||||
|
min_args=1)
|
||||||
|
bot.events.on("received").on("command").on("devoice"
|
||||||
|
).hook(self.devoice, channel_only=True, require_mode="o",
|
||||||
|
min_args=1)
|
||||||
|
|
||||||
def kick(self, event):
|
def kick(self, event):
|
||||||
target = event["args_split"][0]
|
target = event["args_split"][0]
|
||||||
|
@ -50,3 +59,9 @@ class Module(object):
|
||||||
|
|
||||||
def op(self, event):
|
def op(self, event):
|
||||||
event["target"].send_mode("+o", event["args_split"][0])
|
event["target"].send_mode("+o", event["args_split"][0])
|
||||||
|
def deop(self, event):
|
||||||
|
event["target"].send_mode("-o", event["args_split"][0])
|
||||||
|
def voice(self, event):
|
||||||
|
event["target"].send_mode("+v", event["args_split"][0])
|
||||||
|
def devoice(self, event):
|
||||||
|
event["target"].send_mode("-v", event["args_split"][0])
|
||||||
|
|
Loading…
Reference in a new issue