replace match with find in getpriority path for efficiency

This commit is contained in:
Jrc13245
2026-01-10 09:59:57 -05:00
parent 5ae45b3406
commit 05d1e2186b
+2 -1
View File
@@ -275,7 +275,8 @@ do
return PRIORITY[source]
end
-- Check for prefixed sources (e.g., "pfui:player" -> "pfui")
local prefix = string.match(source, "^(%w+):")
-- Using string.find with captures for Lua 5.0 compatibility
local _, _, prefix = string.find(source, "^(%w+):")
if prefix and PRIORITY[prefix] then
return PRIORITY[prefix]
end