Refactor Commander and StinkyTracker modules for improved clarity and consistency in type annotations

This commit is contained in:
2025-05-18 12:48:26 +02:00
parent 03597d1b5e
commit ce92e8e12c
2 changed files with 8 additions and 10 deletions

View File

@@ -352,7 +352,7 @@ shared.Commander = {
enabled
and (
not command.commanderOnly
-- if Heimdall_Data.config.commander.debug then print(string.format("[%s] Ignoring command, sender %s not commander %s", ModuleName, sender, Heimdall_Data.config.commander.commander)) end
-- if Heimdall_Data.config.commander.debug then print(string.format("[%s] Ignoring command, sender %s not commander %s", ModuleName, sender, Heimdall_Data.config.commander.commander)) end
or (command.commanderOnly and sender == Heimdall_Data.config.commander.commander)
)
@@ -360,10 +360,8 @@ shared.Commander = {
if msg:match(command.keywordRe) then
---@diagnostic disable-next-line: redundant-parameter Currently luals does not support variadic functions as a @field
local messages = command.callback({ strsplit(",", msg) })
local messages = command.callback({ strsplit(",", msg) })
if Heimdall_Data.config.commander.debug then
---@diagnostic disable-next-line: param-type-mismatch
print(
if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Messages to send: %s", ModuleName))
shared.dumpTable(messages)
end
for _, message in ipairs(messages) do