mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
MessageParser: Fix crash if not all matches are used in the replacement.
This commit is contained in:
parent
6439699cfb
commit
121cc1772e
@ -171,7 +171,8 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
thisaction = action
|
thisaction = action
|
||||||
self._updateRank(channel, regexp)
|
self._updateRank(channel, regexp)
|
||||||
for (i, j) in enumerate(match.groups()):
|
for (i, j) in enumerate(match.groups()):
|
||||||
thisaction = re.sub(r'\$' + str(i+1), match.group(i+1), thisaction)
|
if match.group(i+1):
|
||||||
|
thisaction = re.sub(r'\$' + str(i+1), match.group(i+1), thisaction)
|
||||||
actions.append(thisaction)
|
actions.append(thisaction)
|
||||||
if max_triggers != 0 and max_triggers == len(actions):
|
if max_triggers != 0 and max_triggers == len(actions):
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user