From 03c7e8f0665c1036ece49155340697aa3b2d107d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 13 Aug 2019 13:48:03 +0100 Subject: return matching string from buffer.find() as most uses were redundantly regexing --- modules/tweets/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/tweets') diff --git a/modules/tweets/__init__.py b/modules/tweets/__init__.py index 9aaaab17..c07cd739 100644 --- a/modules/tweets/__init__.py +++ b/modules/tweets/__init__.py @@ -152,7 +152,8 @@ class Module(ModuleManager.BaseModule): else: target = event["target"].buffer.find(REGEX_TWITTERURL) if target: - target = target.message + target = target.match + if target: url_match = re.search(REGEX_TWITTERURL, target) if url_match or target.isdigit(): -- cgit v1.3.1-10-gc9f91