diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 12:55:52 +0100 | |
| commit | 9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/ctcp.py | |
| parent | Merge 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/ctcp.py')
| -rw-r--r-- | modules/ctcp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ctcp.py b/modules/ctcp.py index 031b39cd..5320369a 100644 --- a/modules/ctcp.py +++ b/modules/ctcp.py @@ -1,10 +1,10 @@ import datetime class Module(object): - def __init__(self, bot): - bot.events.on("received").on("message").on("private").hook( - self.private_message) + def __init__(self, bot, events): self.bot = bot + events.on("received").on("message").on("private").hook( + self.private_message) def private_message(self, event): if event["message"][0] == "\x01" and event["message"][-1] == "\x01": |
