aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_op.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-15 18:42:14 +0100
committerGravatar jesopo2019-06-15 18:42:14 +0100
commit8ab4880c5cac3305b4379aafe5bcf1bbd9a8e888 (patch)
tree4f355c36d0f7f3058b2f0338d25c595b52c6477e /modules/channel_op.py
parentRemove debug yield check (diff)
signature
Change from `yield` checks to a func in `events` that pass up EventErrors
Diffstat (limited to 'modules/channel_op.py')
-rw-r--r--modules/channel_op.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py
index 819911f6..c1c3d7be 100644
--- a/modules/channel_op.py
+++ b/modules/channel_op.py
@@ -56,7 +56,8 @@ class Module(ModuleManager.BaseModule):
:prefix: Kick
"""
channel = event["server"].channels.get(event["args_split"][0])
- yield utils.Check("channel-access", channel, "kick")
+
+ event["check_assert"](utils.Check("channel-access", channel, "kick"))
self._kick_command(event, channel, event["args_split"][1:])
@@ -107,7 +108,8 @@ class Module(ModuleManager.BaseModule):
:usage: <channel> <nickname/hostmask>
"""
channel = event["server"].channels.get(event["args_split"][0])
- yield utils.Check("channel-access", channel, "ban")
+
+ event["check_assert"](utils.Check("channel-access", channel, "ban"))
self._ban(event["server"], channel, True, event["args_split"][1])
@utils.hook("received.command.ban", channel_only=True, min_args=1)
@@ -181,7 +183,8 @@ class Module(ModuleManager.BaseModule):
:usage: <channel> <nickname/hostmask>
"""
channel = event["server"].channels.get(event["args_split"][0])
- yield utils.Check("channel-access", channel, "ban")
+
+ event["check_assert"](utils.Check("channel-access", channel, "ban"))
self._ban(event["server"], channel, False, event["args_split"][1])