Skip to content

Commit 84c13dd

Browse files
committed
playernames: Check for secrets
1 parent e3d6fd7 commit 84c13dd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

playernames.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ BCM.modules[#BCM.modules+1] = function()
1818

1919
local GetGuildRosterInfo, Ambiguate, GetRaidRosterInfo = GetGuildRosterInfo, Ambiguate, GetRaidRosterInfo
2020
local tostring = tostring
21+
local issecretvalue = issecretvalue or function() return false end
2122

2223
--[[ Start Harvest Data ]]--
2324
local nameLevels, nameGroup, nameColor = nil, nil, nil
@@ -30,7 +31,7 @@ BCM.modules[#BCM.modules+1] = function()
3031
if UnitIsPlayer("target") and UnitIsFriend("player", "target") then
3132
local n, s = UnitName("target")
3233
local l = UnitLevel("target")
33-
if n and l and l > 0 then
34+
if n and l and not issecretvalue(n) and not issecretvalue(s) and not issecretvalue(l) and l > 0 then
3435
if s and s ~= "" then n = n.."-"..s end
3536
nameLevels[n] = tostring(l)
3637
end
@@ -42,7 +43,7 @@ BCM.modules[#BCM.modules+1] = function()
4243
if UnitIsPlayer("mouseover") and UnitIsFriend("player", "mouseover") then
4344
local n, s = UnitName("mouseover")
4445
local l = UnitLevel("mouseover")
45-
if n and l and l > 0 then
46+
if n and l and not issecretvalue(n) and not issecretvalue(s) and not issecretvalue(l) and l > 0 then
4647
if s and s ~= "" then n = n.."-"..s end
4748
nameLevels[n] = tostring(l)
4849
end

0 commit comments

Comments
 (0)