aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-19 08:41:20 +0100
committerGravatar jesopo2019-05-19 08:41:20 +0100
commit8be178f4064b8239a16fd7ebd2c86c84901ce480 (patch)
tree2c99e8951c14f3d648cdafbf085d20e22a2c5bef
parent`event["channel"]` -> `event["target"]` (from regex-commands change) (diff)
signature
Use re.search, not re.match, for command.regex hooks
-rw-r--r--modules/commands/__init__.py2
1 files changed, 1 insertions, 1 deletions
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"],