aboutsummaryrefslogtreecommitdiff
path: root/modules/check_mode.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-31 12:55:52 +0100
committerGravatar jesopo2018-08-31 12:55:52 +0100
commit9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch)
treed5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/check_mode.py
parentMerge pull request #7 from dngfx/master (diff)
signature
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/check_mode.py')
-rw-r--r--modules/check_mode.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/check_mode.py b/modules/check_mode.py
index a7a8e788..4fb2b783 100644
--- a/modules/check_mode.py
+++ b/modules/check_mode.py
@@ -1,10 +1,9 @@
class Module(object):
- def __init__(self, bot):
+ def __init__(self, bot, events):
self.bot = bot
- bot.events.on("preprocess").on("command").hook(
- self.preprocess_command)
+ events.on("preprocess").on("command").hook(self.preprocess_command)
def preprocess_command(self, event):
if event["is_channel"] and event["hook"].kwargs.get(