Make inviter whitelist multiple channels (ie. read)

This commit is contained in:
2025-01-21 08:56:59 +01:00
parent 8fbff23bee
commit 2c7089504f
2 changed files with 9 additions and 4 deletions

View File

@@ -6,6 +6,11 @@ local ModuleName = "Inviter"
---@diagnostic disable-next-line: missing-fields
shared.Inviter = {}
function shared.Inviter.Init()
if type(Heimdall_Data.config.inviter.listeningChannel) == "string" then
Heimdall_Data.config.inviter.listeningChannel = {
[Heimdall_Data.config.inviter.listeningChannel] = true
}
end
---@type Timer
local updateTimer = nil
@@ -187,7 +192,7 @@ function shared.Inviter.Init()
print(string.format("[%s] Channel name: %s", ModuleName, channelname))
end
if channelname ~= Heimdall_Data.config.inviter.listeningChannel then
if not Heimdall_Data.config.inviter.listeningChannel[channelname] then
if Heimdall_Data.config.inviter.debug then
print(string.format("[%s] Channel name does not match listening channel", ModuleName))
end