Fix naming in bonkdetector

This commit is contained in:
2025-01-26 18:16:19 +01:00
parent 0e951d7089
commit 7150189a0d

View File

@@ -86,30 +86,20 @@ function shared.BonkDetector.Init()
ModuleName, source, destination, subevent))
end
local notifyChannel = Heimdall_Data.config.bonkDetector.notifyChannel
local msg = string.format("%s hit %s (%s)", source, destination, subevent)
if Heimdall_Data.config.bonkDetector.debug then
print(string.format("[%s] Queueing message to Agent channel: %s", ModuleName, msg))
end
for _, channel in pairs(Heimdall_Data.config.bonkDetector.channels) do
local locale = shared.GetLocaleForChannel(channel)
local msg = string.format(shared._L("bonkDetected", locale), source, destination, subevent)
---@type Message
local message = {
channel = "C",
data = notifyChannel,
message = string.format(shared.L.en.bonkDetected, source, destination, subevent),
data = channel,
message = msg,
}
if Heimdall_Data.config.bonkDetector.debug then
print(string.format("[%s] Queueing English message: %s", ModuleName, message.message))
print(string.format("[%s] Queuing bonk detector message", ModuleName))
shared.dumpTable(message)
end
table.insert(shared.messenger.queue, message)
if Heimdall_Data.config.echoToRussian then
-- Russian message
local ruMessage = {
channel = "C",
data = notifyChannel .. "ru",
message = string.format(shared.L.ru.bonkDetected, source, destination, subevent),
}
table.insert(shared.messenger.queue, ruMessage)
end
end)