aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_save.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/channel_save.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/channel_save.py')
-rw-r--r--modules/channel_save.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/channel_save.py b/modules/channel_save.py
index c70d8751..afbd4200 100644
--- a/modules/channel_save.py
+++ b/modules/channel_save.py
@@ -1,11 +1,10 @@
class Module(object):
- def __init__(self, bot):
- bot.events.on("received.numeric.001").hook(
- self.on_connect)
- bot.events.on("self.join").hook(self.on_join)
- bot.events.on("self.kick").hook(self.on_kick)
+ def __init__(self, bot, events):
+ events.on("received.numeric.001").hook(self.on_connect)
+ events.on("self.join").hook(self.on_join)
+ events.on("self.kick").hook(self.on_kick)
def on_connect(self, event):
channels = event["server"].get_setting("autojoin", [])