Make agent tracker sniff channel messages for agents

This commit is contained in:
2025-01-05 17:17:15 +01:00
parent 16cd2f82be
commit 35c51143bc
3 changed files with 16 additions and 3 deletions

BIN
Heimdall.zip (Stored with Git LFS)

Binary file not shown.

View File

@@ -21,6 +21,19 @@ function shared.AgentTracker.Init()
end
--shared.dumpTable(Heimdall_Data.config.agents)
end)
local agentTrackerChannelSniffer = CreateFrame("Frame")
agentTrackerChannelSniffer:RegisterEvent("CHAT_MSG_CHANNEL")
agentTrackerChannelSniffer:SetScript("OnEvent", function(self, event, msg, sender, ...)
if not Heimdall_Data.config.agentTracker.enabled then return end
local channelId = select(6, ...)
local channelname = GetChannelName(channelId)
if not channelname then return end
if channelname ~= Heimdall_Data.config.who.notifyChannel then return end
local agentName = sender
if not agentName then return end
Heimdall_Data.config.agents[agentName] = date("%Y-%m-%dT%H:%M:%S")
end)
print("Heimdall - AgentTracker loaded")
end

View File

@@ -296,7 +296,7 @@ function shared.Whoer.Init()
local stinky = Heimdall_Data.config.stinkies[name]
if stinky then
player.stinky = true
PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
--PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
else
--PlaySoundFile("Interface\\Sounds\\Cloak.ogg", "Master")
end