diff options
| author | 2019-06-28 23:16:05 +0100 | |
|---|---|---|
| committer | 2019-06-28 23:16:05 +0100 | |
| commit | ae9d099a41b703ce875cf8746a94b6995bbaedfb (patch) | |
| tree | c389ae3b967c43055a1c671b8cebf04db4e8f8b6 /modules/check_urls.py | |
| parent | message 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.py | 16 |
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): |
