use utils.deadline in sed.py
This commit is contained in:
parent
e97e3c8f30
commit
162aab9851
1 changed files with 5 additions and 2 deletions
|
@ -54,8 +54,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
for_user = event["user"].nickname if self._closest_setting(event,
|
for_user = event["user"].nickname if self._closest_setting(event,
|
||||||
"sed-sender-only", False) else None
|
"sed-sender-only", False) else None
|
||||||
match = event["target"].buffer.find(pattern, from_self=False,
|
|
||||||
|
def _find():
|
||||||
|
return event["target"].buffer.find(pattern, from_self=False,
|
||||||
for_user=for_user, not_pattern=REGEX_SED)
|
for_user=for_user, not_pattern=REGEX_SED)
|
||||||
|
match = utils.deadline(_find)
|
||||||
if match:
|
if match:
|
||||||
new_message = re.sub(pattern, replace, match.line.message,
|
new_message = re.sub(pattern, replace, match.line.message,
|
||||||
count)
|
count)
|
||||||
|
|
Loading…
Reference in a new issue