diff options
| author | 2017-12-26 10:32:36 +0000 | |
|---|---|---|
| committer | 2017-12-26 10:32:36 +0000 | |
| commit | 0cc72d5d66bc3a6abf7757c7202905bd656ddf1d (patch) | |
| tree | a2591a46c4e25f359b7ed6990f31d91be22d4d1d /modules/commands.py | |
| parent | NR: Indicate interesting activity at locations (diff) | |
| signature | ||
Added a "replay" system to EventManager hooks, to replay missed .calls
Diffstat (limited to 'modules/commands.py')
| -rw-r--r-- | modules/commands.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/commands.py b/modules/commands.py index 6985c869..5c5d8d1d 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -56,16 +56,15 @@ class Module(object): usage="<command>") bot.events.on("received").on("command").on("more").hook(self.more, help="Get more output from the last command") - bot.events.on("boot").on("done").hook(self.boot_done) - bot.events.on("new").on("user", "channel").hook(self.new) - bot.events.on("send").on("stdout").hook(self.send_stdout) - bot.events.on("send").on("stderr").hook(self.send_stderr) - def boot_done(self, event): - self.bot.events.on("postboot").on("configure").on( + bot.events.on("postboot").on("configure").on( "channelset").call(setting="command-prefix", help="Set the command prefix used in this channel") + bot.events.on("new").on("user", "channel").hook(self.new) + bot.events.on("send").on("stdout").hook(self.send_stdout) + bot.events.on("send").on("stderr").hook(self.send_stderr) + def new(self, event): if "user" in event: target = event["user"] |
