diff options
| author | 2018-08-05 15:35:23 +0100 | |
|---|---|---|
| committer | 2018-08-05 15:35:23 +0100 | |
| commit | 7114bb7155497646e656ed29860b3bbe9e726690 (patch) | |
| tree | 4891c2f639afbd69fbe59e42a8f8c8ba51a9d873 /modules/sed.py | |
| parent | Improve using correct nickname capitalisation in words.py (diff) | |
| signature | ||
only get "sed" setting when a message that looks like a sed command comes in
Diffstat (limited to 'modules/sed.py')
| -rw-r--r-- | modules/sed.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/sed.py b/modules/sed.py index 32934db5..ca75706c 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -21,10 +21,12 @@ class Module(object): validate=Utils.bool_or_none) def channel_message(self, event): - if event["action"] or not Utils.get_closest_setting(event, "sed", True): - return sed_split = re.split(REGEX_SPLIT, event["message"], 3) if event["message"].startswith("s/") and len(sed_split) > 2: + if event["action"] or not Utils.get_closest_setting( + event, "sed", True): + return + regex_flags = 0 flags = (sed_split[3:] or [""])[0] count = None |
