From 0cc72d5d66bc3a6abf7757c7202905bd656ddf1d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 26 Dec 2017 10:32:36 +0000 Subject: Added a "replay" system to EventManager hooks, to replay missed .calls --- modules/sed.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/sed.py') diff --git a/modules/sed.py b/modules/sed.py index 77c6f9a2..32934db5 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -7,16 +7,14 @@ REGEX_SED = re.compile("^s/") class Module(object): def __init__(self, bot): self.bot = bot - bot.events.on("boot").on("done").hook(self.boot_done) bot.events.on("received").on("message").on("channel").hook( self.channel_message) - def boot_done(self, event): - self.bot.events.on("postboot").on("configure").on( + bot.events.on("postboot").on("configure").on( "channelset").call(setting="sed", help="Disable/Enable sed in a channel", validate=Utils.bool_or_none) - self.bot.events.on("postboot").on("configure").on( + bot.events.on("postboot").on("configure").on( "channelset").call(setting="sed-sender-only", help= "Disable/Enable sed only looking at the messages sent by the user", -- cgit v1.3.1-10-gc9f91