Harden final ClassicAPI audit interactions

This commit is contained in:
Dusk-92
2026-09-05 16:41:09 +02:00
parent 5bcbab1b74
commit 2f1c4f42cb
4 changed files with 86 additions and 68 deletions
+4 -2
View File
@@ -2,6 +2,7 @@ local _G = ShaguTweaks.GetGlobalEnv()
local T = ShaguTweaks.T
local L = ShaguTweaks.L
local gfind = string.gmatch or string.gfind
local strfind = string.find
local GetUnitData = ShaguTweaks.GetUnitData
local GetPlayerCache = ShaguTweaks.GetPlayerCache
local hooksecurefunc = ShaguTweaks.hooksecurefunc
@@ -119,7 +120,7 @@ end
local classHex = {}
local function GetPlayerNameFromLink(payload)
local colon = string.find(payload, ":")
local colon = strfind(payload, ":")
if colon then
return string.sub(payload, 1, colon - 1)
end
@@ -128,6 +129,7 @@ end
local function ColorPlayerLinks(text)
if not text then return text end
if not strfind(text, "|Hplayer:", 1, true) then return text end
for name in gfind(text, "|Hplayer:(.-)|h") do
-- Player hyperlinks may contain Turtle metadata after the real name. Avoid
@@ -384,4 +386,4 @@ module.enable = function(self)
end
end)
end
end
end