From a65d2a8fca62253215ca7c45a373c84e741bc832 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 13 Apr 2023 23:48:12 +0200 Subject: [PATCH] [linkprotect] Fix: Apply `stop_on_no_action` when no links present Signed-off-by: Knut Ahlers --- internal/actors/linkprotect/actor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/actors/linkprotect/actor.go b/internal/actors/linkprotect/actor.go index ccd8e76..4c887dc 100644 --- a/internal/actors/linkprotect/actor.go +++ b/internal/actors/linkprotect/actor.go @@ -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 }