aboutsummaryrefslogtreecommitdiff
path: root/modules/title.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-26 14:37:26 +0100
committerGravatar jesopo2019-06-26 14:37:41 +0100
commitc5785a2d1484a98616b0fb8b5a7cb728eb094435 (patch)
tree470ace2c509805fb9b723592df196b4e9e0edb46 /modules/title.py
parentUpdate IRCBot `except queue.Empty` comment (diff)
signature
implement @utils.kwarg() magic, use it for command.regex hooks
Diffstat (limited to 'modules/title.py')
-rw-r--r--modules/title.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/title.py b/modules/title.py
index 184b3393..a6e924cc 100644
--- a/modules/title.py
+++ b/modules/title.py
@@ -47,13 +47,12 @@ class Module(ModuleManager.BaseModule):
else:
return None
- @utils.hook("command.regex", ignore_action=False,
- priority=EventManager.PRIORITY_MONITOR)
+ @utils.hook("command.regex")
+ @utils.kwarg("ignore_action", False)
+ @utils.kwarg("priority", EventManager.PRIORITY_MONITOR)
+ @utils.kwarg("command", "title")
+ @utils.kwarg("pattern", utils.http.REGEX_URL)
def channel_message(self, event):
- """
- :command: title
- :pattern-url: 1
- """
if event["target"].get_setting("auto-title", False):
event.eat()
url = event["match"].group(0)