From b699c120a0894e464d7b2ae972ce13adbfcc54b8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 28 Aug 2018 14:55:08 +0100 Subject: Change how specific events assure their hooks gets the event independant of loading order --- modules/channel_op.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/channel_op.py') 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): -- cgit v1.3.1-10-gc9f91