Something is voiding the iris, lets fix that.. also open on outgoing

This commit is contained in:
2025-12-29 21:22:00 -05:00
parent 7630898bc4
commit e5848f0e79
2 changed files with 12 additions and 5 deletions

View File

@ -159,7 +159,7 @@ function display.showIncoming(addressName, addressString, allowed, reason)
mon.setCursorPos(1, 6) mon.setCursorPos(1, 6)
mon.setBackgroundColor(colors.black) mon.setBackgroundColor(colors.black)
-- Show name if found in address book -- Show name if found in address book
if addressName then if addressName then
mon.write("Name: " .. addressName) mon.write("Name: " .. addressName)

View File

@ -249,8 +249,8 @@ end
local function findAddressName(address) local function findAddressName(address)
-- Search all address categories for matching address -- Search all address categories for matching address
local categories = {addresses.MainGates, addresses.playerGates, addresses.hazardGates} local categories = { addresses.MainGates, addresses.playerGates, addresses.hazardGates }
for _, category in ipairs(categories) do for _, category in ipairs(categories) do
for _, entry in ipairs(category) do for _, entry in ipairs(category) do
local name, storedAddress = entry[1], entry[2] local name, storedAddress = entry[1], entry[2]
@ -269,7 +269,7 @@ local function findAddressName(address)
end end
end end
end end
return nil -- Not found in address book return nil -- Not found in address book
end end
@ -291,7 +291,7 @@ local function handleIncomingWormhole()
-- Check security -- Check security
local allowed, reason = utils.isAddressAllowed(state.incomingAddress) local allowed, reason = utils.isAddressAllowed(state.incomingAddress)
local addressString = gate.addressToString(state.incomingAddress) or "Unknown" local addressString = gate.addressToString(state.incomingAddress) or "Unknown"
-- Look up address name in address book -- Look up address name in address book
local addressName = findAddressName(state.incomingAddress) local addressName = findAddressName(state.incomingAddress)
@ -308,6 +308,8 @@ local function handleIncomingWormhole()
if config.autoCloseIrisOnIncoming then if config.autoCloseIrisOnIncoming then
sleep(config.irisCloseDelay) sleep(config.irisCloseDelay)
if allowed then if allowed then
-- Wait 2 seconds after connection established before opening iris
sleep(2)
utils.openIris() utils.openIris()
else else
utils.closeIris() utils.closeIris()
@ -547,6 +549,11 @@ local function handleOutgoingDial()
os.pullEvent("stargate_outgoing_wormhole") os.pullEvent("stargate_outgoing_wormhole")
-- Open local iris for outgoing connection
if config.irisEnabled then
utils.openIris()
end
-- Wait briefly for version message from remote gate -- Wait briefly for version message from remote gate
state.remoteHasComputer = false state.remoteHasComputer = false
local function WaitForVersion() local function WaitForVersion()