From 8bebcb14c74e7f5cf0ff7ddf7cab5b2fd05ab74e Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 1 Sep 2019 09:58:10 +0100 Subject: [PATCH] support ": s/" sed format --- modules/sed.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/sed.py b/modules/sed.py index 62879da0..3d3c15f1 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -5,7 +5,7 @@ import re, traceback from src import ModuleManager, utils REGEX_SPLIT = re.compile("(? 2: + if len(sed_split) > 2: if not self._closest_setting(event, "sed", False): return @@ -52,8 +52,9 @@ class Module(ModuleManager.BaseModule): return replace = utils.irc.bold(sed_split[2].replace("\\/", "/")) - for_user = event["user"].nickname if self._closest_setting(event, - "sed-sender-only", False) else None + for_user = event["match"].group(1) + if self._closest_setting(event, "sed-sender-only", False): + for_user = event["user"].nickname with utils.deadline(): match = event["target"].buffer.find(pattern, from_self=False,