Use re.search, not re.match, for command.regex hooks

This commit is contained in:
jesopo 2019-05-19 08:41:20 +01:00
parent 7ccfa12b00
commit 8be178f406

View file

@ -242,7 +242,7 @@ class Module(ModuleManager.BaseModule):
pattern = utils.http.REGEX_URL pattern = utils.http.REGEX_URL
if pattern: if pattern:
match = re.match(pattern, event["message"]) match = re.search(pattern, event["message"])
if match: if match:
command = hook.get_kwarg("command", "") command = hook.get_kwarg("command", "")
res = self.command(event["server"], event["channel"], res = self.command(event["server"], event["channel"],