diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index cbedd9f97..f8ab8ce00 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -147,7 +147,8 @@ bool ScriptUtils::Regex(const std::vector& args) return false; } - return true; + /* MatchAny: Nothing matched. MatchAll: Everything matched. */ + return mode == MatchAll; } else { String text = argTexts; boost::smatch what; @@ -189,7 +190,8 @@ bool ScriptUtils::Match(const std::vector& args) return false; } - return true; + /* MatchAny: Nothing matched. MatchAll: Everything matched. */ + return mode == MatchAll; } else { String text = argTexts; return Utility::Match(pattern, argTexts); @@ -230,7 +232,8 @@ bool ScriptUtils::CidrMatch(const std::vector& args) return false; } - return true; + /* MatchAny: Nothing matched. MatchAll: Everything matched. */ + return mode == MatchAll; } else { String ip = argIps; return Utility::CidrMatch(pattern, ip);