aboutsummaryrefslogtreecommitdiff
path: root/modules/check_urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/check_urls.py')
-rw-r--r--modules/check_urls.py3
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",