Fix zone notify for in commander

This commit is contained in:
2025-01-27 16:21:57 +01:00
parent d047c632ed
commit 7aa5d50a6c
5 changed files with 17 additions and 12 deletions

View File

@@ -182,7 +182,7 @@ function shared.Whoer.Init()
---@param inputZone string
---@return boolean
local ShouldNotifyForZone = shared.Memoize(function(inputZone)
shared.Whoer.ShouldNotifyForZone = shared.Memoize(function(inputZone)
if not Heimdall_Data.config.who.debug then
print(string.format("[%s] ShouldNotifyForZone %s", ModuleName, inputZone))
end
@@ -245,7 +245,7 @@ function shared.Whoer.Init()
return string.format("Cannot notify for nil player %s", tostring(player))
end
if not ShouldNotifyForZone(player.zone) then
if not shared.Whoer.ShouldNotifyForZone(player.zone) then
--if not Heimdall_Data.config.who.zoneNotifyFor[player.zone] then
if Heimdall_Data.config.who.debug then
print(string.format("[%s] Skipping notification - Zone '%s' not in notify list", ModuleName, player.zone))
@@ -306,7 +306,7 @@ function shared.Whoer.Init()
if not player then return string.format("Cannot notify for nil player %s", tostring(player)) end
--if not Heimdall_Data.config.who.zoneNotifyFor[zone]
-- and not Heimdall_Data.config.who.zoneNotifyFor[player.zone] then
if not ShouldNotifyForZone(zone) and not ShouldNotifyForZone(player.zone) then
if not shared.Whoer.ShouldNotifyForZone(zone) and not shared.Whoer.ShouldNotifyForZone(player.zone) then
return string.format("Not notifying for zones %s and %s", tostring(zone), tostring(player.zone))
end
for _, channel in pairs(Heimdall_Data.config.who.channels) do
@@ -354,7 +354,7 @@ function shared.Whoer.Init()
if not Heimdall_Data.config.who.enabled then return end
if not player then return string.format("Cannot notify for nil player %s", tostring(player)) end
--if not Heimdall_Data.config.who.zoneNotifyFor[player.zone] then
if not ShouldNotifyForZone(player.zone) then
if not shared.Whoer.ShouldNotifyForZone(player.zone) then
return string.format("Not notifying for zone %s", tostring(player.zone))
end