diff options
| author | 2018-08-28 14:55:08 +0100 | |
|---|---|---|
| committer | 2018-08-28 14:55:08 +0100 | |
| commit | b699c120a0894e464d7b2ae972ce13adbfcc54b8 (patch) | |
| tree | 3d93f3f1f841d641bc30994f69fd0261e4206b42 /modules/channel_op.py | |
| parent | Switch to time.monotonic for comparisons, only send data at most once every .5 (diff) | |
Change how specific events assure their hooks gets the event independant of
loading order
Diffstat (limited to 'modules/channel_op.py')
| -rw-r--r-- | modules/channel_op.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py index 43251609..4dc53b28 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -32,19 +32,19 @@ class Module(object): bot.events.on("received").on("message").on("channel").hook(self.highlight_spam) bot.events.on("postboot").on("configure").on( - "channelset").call(setting="highlight-spam-threshold", - help="Set the number of nicknames in a message that qualifies as spam", - validate=Utils.int_or_none) + "channelset").assure_call(setting="highlight-spam-threshold", + help="Set the number of nicknames in a message that " + "qualifies as spam", validate=Utils.int_or_none) bot.events.on("postboot").on("configure").on( - "channelset").call(setting="highlight-spam-protection", + "channelset").assure_call(setting="highlight-spam-protection", help="Enable/Disable highlight spam protection", validate=Utils.bool_or_none) bot.events.on("postboot").on("configure").on( - "channelset").call(setting="highlight-spam-ban", - help="Enable/Disable banning highlight spammers instead of just kicking", - validate=Utils.bool_or_none) + "channelset").assure_call(setting="highlight-spam-ban", + help="Enable/Disable banning highlight spammers " + "instead of just kicking", validate=Utils.bool_or_none) bot.events.on("postboot").on("configure").on( - "channelset").call(setting="ban-format", + "channelset").assure_call(setting="ban-format", help="Set ban format ($n = nick, $u = username, $h = hostname)") def kick(self, event): |
