diff options
| author | 2018-09-26 18:27:17 +0100 | |
|---|---|---|
| committer | 2018-09-26 18:27:17 +0100 | |
| commit | 51a52e2b0e54031cce5876f54d1d48c268b5441c (patch) | |
| tree | a4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/check_urls.py | |
| parent | Also use docstrings to check if a command has help available, allow one-string (diff) | |
| signature | ||
Switch to using @Utils.hook and docstrings for event hooks
Diffstat (limited to 'modules/check_urls.py')
| -rw-r--r-- | modules/check_urls.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/check_urls.py b/modules/check_urls.py index fa05695e..b0438ec8 100644 --- a/modules/check_urls.py +++ b/modules/check_urls.py @@ -10,8 +10,6 @@ class Module(object): def __init__(self, bot, events, exports): self.bot = bot self.events = events - events.on("received.message.channel").hook(self.message) - exports.add("channelset", {"setting": "check-urls", "help": "Enable/Disable automatically checking for " "malicious URLs", "validate": Utils.bool_or_none}) @@ -22,6 +20,7 @@ class Module(object): "help": "Enable/Disable automatically kicking users that " "send malicious URLs", "validate": Utils.bool_or_none}) + @Utils.hook("received.message.channel") def message(self, event): match = RE_URL.search(event["message"]) if match and event["channel"].get_setting("check-urls", |
