Add ChatSniffer module and update saved variables

This commit is contained in:
2025-05-25 02:37:07 +02:00
parent bfce95b299
commit 500c543d7c
4 changed files with 45 additions and 3 deletions

View File

@@ -19,11 +19,13 @@ function shared.Sniffer.Init()
end
return
end
if smellThrottle[stinky] and GetTime() - smellThrottle[stinky] < Heimdall_Data.config.sniffer.throttleTime then
local now = GetTime()
local throttle = smellThrottle[stinky] or 0
if now - throttle < Heimdall_Data.config.sniffer.throttle then
if Heimdall_Data.config.sniffer.debug then print(string.format("%s: Throttled", ModuleName)) end
return
end
smellThrottle[stinky] = GetTime()
smellThrottle[stinky] = now
for _, channel in pairs(Heimdall_Data.config.sniffer.channels) do
local locale = shared.GetLocaleForChannel(channel)