From 8be178f4064b8239a16fd7ebd2c86c84901ce480 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 19 May 2019 08:41:20 +0100 Subject: Use re.search, not re.match, for command.regex hooks --- modules/commands/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/commands') diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 78cad2e8..c99410a3 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -242,7 +242,7 @@ class Module(ModuleManager.BaseModule): pattern = utils.http.REGEX_URL if pattern: - match = re.match(pattern, event["message"]) + match = re.search(pattern, event["message"]) if match: command = hook.get_kwarg("command", "") res = self.command(event["server"], event["channel"], -- cgit v1.3.1-10-gc9f91