Fix naming in commander
This commit is contained in:
@@ -280,10 +280,20 @@ function shared.Commander.Init()
|
||||
end
|
||||
local channelId = select(6, ...)
|
||||
local _, channelname = GetChannelName(channelId)
|
||||
-- if Heimdall_Data.config.commander.debug then
|
||||
-- print(string.format("[%s] Channel received: %s", ModuleName, channelname))
|
||||
-- end
|
||||
if channelname ~= Heimdall_Data.config.commander.masterChannel then return end
|
||||
local ok = false
|
||||
for _, channel in pairs(Heimdall_Data.config.commander.channels) do
|
||||
if channel == channelname then
|
||||
ok = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not ok then
|
||||
if Heimdall_Data.config.commander.debug then
|
||||
print(string.format("[%s] Channel name does not match any of the channels", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
sender = string.match(sender, "^[^-]+")
|
||||
if Heimdall_Data.config.commander.debug then
|
||||
print(string.format("[%s] Message from: %s", ModuleName, sender))
|
||||
|
||||
Reference in New Issue
Block a user