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.
@@ -21,6 +21,19 @@ function shared.AgentTracker.Init()
|
|||||||
end
|
end
|
||||||
--shared.dumpTable(Heimdall_Data.config.agents)
|
--shared.dumpTable(Heimdall_Data.config.agents)
|
||||||
end)
|
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")
|
print("Heimdall - AgentTracker loaded")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ function shared.Whoer.Init()
|
|||||||
local stinky = Heimdall_Data.config.stinkies[name]
|
local stinky = Heimdall_Data.config.stinkies[name]
|
||||||
if stinky then
|
if stinky then
|
||||||
player.stinky = true
|
player.stinky = true
|
||||||
PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
|
--PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
|
||||||
else
|
else
|
||||||
--PlaySoundFile("Interface\\Sounds\\Cloak.ogg", "Master")
|
--PlaySoundFile("Interface\\Sounds\\Cloak.ogg", "Master")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user