aboutsummaryrefslogtreecommitdiff
path: root/modules/to.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-31 12:55:52 +0100
committerGravatar dongfix2018-08-31 13:44:39 +0100
commitb7cf524e9869828ff85954cb731f7fee98bee8d9 (patch)
treed5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/to.py
parentRevert "Reformat" (diff)
signature
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/to.py')
-rw-r--r--modules/to.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/to.py b/modules/to.py
index 24009efd..89abc477 100644
--- a/modules/to.py
+++ b/modules/to.py
@@ -1,11 +1,11 @@
import EventManager
class Module(object):
- def __init__(self, bot):
- bot.events.on("received").on("message").on("channel"
+ def __init__(self, bot, events):
+ events.on("received").on("message").on("channel"
).hook(self.channel_message,
priority=EventManager.PRIORITY_MEDIUM)
- bot.events.on("received").on("command").on("to").hook(
+ events.on("received").on("command").on("to").hook(
self.to, min_args=2, help=("Relay a message to a "
"user the next time they talk in a channel"),
channel_only=True, usage="<username> <message>")