aboutsummaryrefslogtreecommitdiff
path: root/modules/sed.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/sed.py
parentUpdate IRCBot `except queue.Empty` comment (diff)
signature
implement @utils.kwarg() magic, use it for command.regex hooks
Diffstat (limited to 'modules/sed.py')
-rw-r--r--modules/sed.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/sed.py b/modules/sed.py
index 0c7d6f2a..20e85b68 100644
--- a/modules/sed.py
+++ b/modules/sed.py
@@ -19,11 +19,9 @@ class Module(ModuleManager.BaseModule):
event["server"].get_setting(setting, default))
@utils.hook("command.regex")
+ @utils.kwarg("command", "sed")
+ @utils.kwarg("pattern", REGEX_SED)
def channel_message(self, event):
- """
- :command: sed
- :pattern: ^s/
- """
sed_split = re.split(REGEX_SPLIT, event["message"], 3)
if event["message"].startswith("s/") and len(sed_split) > 2:
if not self._closest_setting(event, "sed", False):