From 162aab98512fdf0ccb157a2271e036c3b1128840 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 30 Aug 2019 17:17:31 +0100 Subject: [PATCH] use utils.deadline in sed.py --- modules/sed.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/sed.py b/modules/sed.py index c54c56fd..31e7316e 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -54,8 +54,11 @@ class Module(ModuleManager.BaseModule): for_user = event["user"].nickname if self._closest_setting(event, "sed-sender-only", False) else None - match = event["target"].buffer.find(pattern, from_self=False, - for_user=for_user, not_pattern=REGEX_SED) + + def _find(): + return event["target"].buffer.find(pattern, from_self=False, + for_user=for_user, not_pattern=REGEX_SED) + match = utils.deadline(_find) if match: new_message = re.sub(pattern, replace, match.line.message, count)