Make agent tracker sniff channel messages for agents
This commit is contained in:
BIN
Heimdall.zip
(Stored with Git LFS)
BIN
Heimdall.zip
(Stored with Git LFS)
Binary file not shown.
@@ -22,5 +22,18 @@ function shared.AgentTracker.Init()
|
||||
--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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user