aboutsummaryrefslogtreecommitdiff
path: root/modules/check_urls.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-28 23:16:05 +0100
committerGravatar jesopo2019-06-28 23:16:05 +0100
commitae9d099a41b703ce875cf8746a94b6995bbaedfb (patch)
treec389ae3b967c43055a1c671b8cebf04db4e8f8b6 /modules/check_urls.py
parentmessage arg for HTTPWrongContentTypeException/HTTPParsingException (diff)
Refactor set/channelset/serverset/botset in to 'utils.Setting' objects
Diffstat (limited to 'modules/check_urls.py')
-rw-r--r--modules/check_urls.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/check_urls.py b/modules/check_urls.py
index 1ea83ebc..c8e81642 100644
--- a/modules/check_urls.py
+++ b/modules/check_urls.py
@@ -8,16 +8,12 @@ from src import ModuleManager, utils
URL_VIRUSTOTAL = "https://www.virustotal.com/vtapi/v2/url/report"
RE_URL = re.compile(r"https?://\S+", re.I)
-@utils.export("channelset", {"setting": "check-urls",
- "help": "Enable/Disable automatically checking for malicious URLs",
- "validate": utils.bool_or_none, "example": "on"})
-@utils.export("serverset", {"setting": "check-urls",
- "help": "Enable/Disable automatically checking for malicious URLs",
- "validate": utils.bool_or_none, "example": "on"})
-@utils.export("channelset", {"setting": "check-urls-kick",
- "help": "Enable/Disable automatically kicking users that "
- "send malicious URLs", "validate": utils.bool_or_none,
- "example": "on"})
+@utils.export("channelset", utils.BoolSetting("check-urls",
+ "Enable/Disable automatically checking for malicious URLs"))
+@utils.export("serverset", utils.BoolSetting("check-urls",
+ "Enable/Disable automatically checking for malicious URLs"))
+@utils.export("channelset", utils.BoolSetting("check-urls-kick",
+ "Enable/Disable automatically kicking users that send malicious URLs"))
class Module(ModuleManager.BaseModule):
@utils.hook("received.message.channel")
def message(self, event):