diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index 2c65fae3b..3c1a4e5a5 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -151,7 +151,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; @@ -197,7 +198,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); @@ -242,7 +244,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);