Share stinky list with whosniffer
This commit is contained in:
@@ -8,7 +8,7 @@ function(e, ...)
|
|||||||
|
|
||||||
local source, err = CLEUParser.GetSourceName(...)
|
local source, err = CLEUParser.GetSourceName(...)
|
||||||
if not err then
|
if not err then
|
||||||
if aura_env.stinkies[source] then
|
if WeakAurasSaved.Cyka.stinkies[source] then
|
||||||
stinky = source
|
stinky = source
|
||||||
detected = true
|
detected = true
|
||||||
end
|
end
|
||||||
@@ -16,7 +16,7 @@ function(e, ...)
|
|||||||
if not detected then
|
if not detected then
|
||||||
local destination, err = CLEUParser.GetDestName(...)
|
local destination, err = CLEUParser.GetDestName(...)
|
||||||
if not err then
|
if not err then
|
||||||
if aura_env.stinkies[destination] then
|
if WeakAurasSaved.Cyka.stinkies[destination] then
|
||||||
stinky = destination
|
stinky = destination
|
||||||
detected = true
|
detected = true
|
||||||
end
|
end
|
||||||
|
@@ -85,7 +85,7 @@ function(allstates, e, prefix, msg, ...)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local stinky = aura_env.stinkies[name]
|
local stinky = WeakAurasSaved.Cyka.stinkies[name]
|
||||||
if not stinky then
|
if not stinky then
|
||||||
if aura_env.config.debug then
|
if aura_env.config.debug then
|
||||||
print(string.format("Could not find stinky for %s", name))
|
print(string.format("Could not find stinky for %s", name))
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -35,7 +35,7 @@ local toNotify = StrSplit(aura_env.config.notify, ",")
|
|||||||
for i, part in ipairs(toNotify) do
|
for i, part in ipairs(toNotify) do
|
||||||
toNotify[i] = strtrim(part)
|
toNotify[i] = strtrim(part)
|
||||||
end
|
end
|
||||||
aura_env.stinkies = {}
|
WeakAurasSaved.Cyka.stinkies = {}
|
||||||
|
|
||||||
|
|
||||||
---@class Message
|
---@class Message
|
||||||
@@ -220,7 +220,7 @@ for i, part in ipairs(stinkies) do
|
|||||||
local name = strtrim(datum[1])
|
local name = strtrim(datum[1])
|
||||||
if name then
|
if name then
|
||||||
local threat = tonumber(strtrim(datum[2] or "5"))
|
local threat = tonumber(strtrim(datum[2] or "5"))
|
||||||
aura_env.stinkies[name] = Stinky.new(name, threat)
|
WeakAurasSaved.Cyka.stinkies[name] = Stinky.new(name, threat)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ aura_env.localStinkies = {}
|
|||||||
---@param name string
|
---@param name string
|
||||||
aura_env.StinkyDetected = function(name)
|
aura_env.StinkyDetected = function(name)
|
||||||
if aura_env.config.debug then print(string.format("StinkyDetected (%s)", name)) end
|
if aura_env.config.debug then print(string.format("StinkyDetected (%s)", name)) end
|
||||||
local stinky = aura_env.stinkies[name]
|
local stinky = WeakAurasSaved.Cyka.stinkies[name]
|
||||||
if not aura_env.localStinkies[name] or aura_env.localStinkies[name] <
|
if not aura_env.localStinkies[name] or aura_env.localStinkies[name] <
|
||||||
GetTime() - aura_env.config.messageThrottle then
|
GetTime() - aura_env.config.messageThrottle then
|
||||||
Message.QueueNotifyGuild(stinky)
|
Message.QueueNotifyGuild(stinky)
|
||||||
@@ -272,7 +272,7 @@ if aura_env.config.addFriends and not aura_env.config.addFriends2 then
|
|||||||
local name = GetFriendInfo(i)
|
local name = GetFriendInfo(i)
|
||||||
friends[name] = true
|
friends[name] = true
|
||||||
end
|
end
|
||||||
for k, v in pairs(aura_env.stinkies) do
|
for k, v in pairs(WeakAurasSaved.Cyka.stinkies) do
|
||||||
if not friends[k] then
|
if not friends[k] then
|
||||||
AddFriend(k)
|
AddFriend(k)
|
||||||
end
|
end
|
||||||
@@ -281,7 +281,7 @@ if aura_env.config.addFriends and not aura_env.config.addFriends2 then
|
|||||||
local numfriends = GetNumFriends()
|
local numfriends = GetNumFriends()
|
||||||
for i = 1, numfriends do
|
for i = 1, numfriends do
|
||||||
local name = GetFriendInfo(i)
|
local name = GetFriendInfo(i)
|
||||||
if aura_env.stinkies[name] then
|
if WeakAurasSaved.Cyka.stinkies[name] then
|
||||||
C_Timer.After(1, function()
|
C_Timer.After(1, function()
|
||||||
-- print(name .. " " .. i .. " Stinky!")
|
-- print(name .. " " .. i .. " Stinky!")
|
||||||
SetFriendNotes(i, "STINKY")
|
SetFriendNotes(i, "STINKY")
|
||||||
|
@@ -7,7 +7,12 @@ function(allstates)
|
|||||||
if ago > aura_env.ttl then
|
if ago > aura_env.ttl then
|
||||||
allstates[k] = { show = false, changed = true }
|
allstates[k] = { show = false, changed = true }
|
||||||
aura_env.alliance[k] = nil
|
aura_env.alliance[k] = nil
|
||||||
|
local stinky = WeakAurasSaved.Cyka.stinkies[v.name]
|
||||||
|
if stinky then
|
||||||
|
PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
|
||||||
|
else
|
||||||
PlaySoundFile("Interface\\Sounds\\Uncloak.ogg", "Master")
|
PlaySoundFile("Interface\\Sounds\\Uncloak.ogg", "Master")
|
||||||
|
end
|
||||||
|
|
||||||
local timestamp = date("%Y-%m-%dT%H:%M:%S")
|
local timestamp = date("%Y-%m-%dT%H:%M:%S")
|
||||||
WeakAurasSaved.Cyka.WhoSniffer[v.name][timestamp] = {
|
WeakAurasSaved.Cyka.WhoSniffer[v.name][timestamp] = {
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user