Fix: Apply preventCooldown before returning

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-12 00:46:14 +02:00
parent 2d4efb4832
commit 5404eb06fe
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -60,10 +60,10 @@ func triggerActions(c *irc.Client, m *irc.Message, rule *Rule, ra *RuleAction) (
}
apc, err := a.Execute(c, m, rule)
preventCooldown = preventCooldown || apc
if err != nil {
return preventCooldown, errors.Wrap(err, "execute action")
}
preventCooldown = preventCooldown || apc
}
return preventCooldown, nil