prevent parser from splitting out the & character

This commit is contained in:
Jrc13245
2025-11-28 18:32:03 -05:00
parent 6486c87798
commit 0d3f026277
+6 -1
View File
@@ -1318,10 +1318,15 @@ function CleveRoids.ParseMsg(msg)
-- Check which separator is present
local hasSlash = string.find(args, "/")
local hasAmpersand = string.find(args, "&")
-- Detect if & is part of a multi-comparison pattern (e.g., >0&<10)
-- Pattern: operator+number followed by & followed by operator
local isMultiComparison = hasAmpersand and string.find(args, "[>~=<]+%d+[^%d]*&[^%d]*[>~=<]")
local separator = "/"
local operatorType = "OR"
if hasAmpersand and not hasSlash then
if hasAmpersand and not hasSlash and not isMultiComparison then
separator = "&"
operatorType = "AND"
elseif hasAmpersand and hasSlash then