This commit is contained in:
@@ -6,9 +6,7 @@ local ModuleName = "Sniffer"
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.Sniffer = {}
|
||||
function shared.Sniffer.Init()
|
||||
if Heimdall_Data.config.sniffer.debug then
|
||||
print(string.format("[%s] Module initializing", ModuleName))
|
||||
end
|
||||
if Heimdall_Data.config.sniffer.debug then print(string.format("[%s] Module initializing", ModuleName)) end
|
||||
local smellThrottle = {}
|
||||
local SmellStinky = function(stinky)
|
||||
if Heimdall_Data.config.sniffer.debug then
|
||||
@@ -16,17 +14,14 @@ function shared.Sniffer.Init()
|
||||
shared.dumpTable(Heimdall_Data.config.sniffer)
|
||||
end
|
||||
if not Heimdall_Data.config.sniffer.enabled then return end
|
||||
if Heimdall_Data.config.sniffer.stinky and
|
||||
not shared.IsStinky(stinky) then
|
||||
if Heimdall_Data.config.sniffer.stinky and not shared.IsStinky(stinky) then
|
||||
if Heimdall_Data.config.sniffer.debug then
|
||||
print(string.format("%s: Stinky not found in config", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if smellThrottle[stinky] and GetTime() - smellThrottle[stinky] < Heimdall_Data.config.sniffer.throttleTime then
|
||||
if Heimdall_Data.config.sniffer.debug then
|
||||
print(string.format("%s: Throttled", ModuleName))
|
||||
end
|
||||
if Heimdall_Data.config.sniffer.debug then print(string.format("%s: Throttled", ModuleName)) end
|
||||
return
|
||||
end
|
||||
smellThrottle[stinky] = GetTime()
|
||||
@@ -83,8 +78,6 @@ function shared.Sniffer.Init()
|
||||
end
|
||||
SmellStinky(destination)
|
||||
end)
|
||||
if Heimdall_Data.config.sniffer.debug then
|
||||
print(string.format("[%s] Module initialized", ModuleName))
|
||||
end
|
||||
if Heimdall_Data.config.sniffer.debug then print(string.format("[%s] Module initialized", ModuleName)) end
|
||||
print("[Heimdall] Sniffer loaded")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user