[linkprotect] Fix: Apply stop_on_no_action when no links present

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-04-13 23:48:12 +02:00
parent e38b6a6f6d
commit a65d2a8fca
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -137,6 +137,9 @@ func (a actor) Execute(c *irc.Client, m *irc.Message, r *plugins.Rule, eventData
if len(links) == 0 {
// If there are no links there is nothing to protect and there
// are also no clips as they are parsed from the links
if attrs.MustBool("stop_on_no_action", ptrBoolFalse) {
return false, plugins.ErrStopRuleExecution
}
return false, nil
}