Minor adjustments
This commit is contained in:
@ -159,7 +159,9 @@ function display.showIncoming(addressString, allowed, reason)
|
|||||||
|
|
||||||
mon.setCursorPos(1, 6)
|
mon.setCursorPos(1, 6)
|
||||||
mon.setBackgroundColor(colors.black)
|
mon.setBackgroundColor(colors.black)
|
||||||
mon.write("Address:\n" .. addressString)
|
mon.write("Address:")
|
||||||
|
mon.setCursorPos(1, 7)
|
||||||
|
mon.write(addressString)
|
||||||
end
|
end
|
||||||
|
|
||||||
function display.showEntity(entityType, entityName, allowed)
|
function display.showEntity(entityType, entityName, allowed)
|
||||||
|
|||||||
@ -146,7 +146,7 @@ local function HandleIncomingPasswordRequest(password)
|
|||||||
utils.sendPasswordResponse(true)
|
utils.sendPasswordResponse(true)
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
utils.log("Incorrect password received: " .. password)
|
utils.log("Incorrect password received")
|
||||||
utils.sendPasswordResponse(false)
|
utils.sendPasswordResponse(false)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -299,12 +299,14 @@ local function handleIncomingWormhole()
|
|||||||
elseif (result == 3) then
|
elseif (result == 3) then
|
||||||
-- Received a message
|
-- Received a message
|
||||||
local message = state.lastReceivedMessage
|
local message = state.lastReceivedMessage
|
||||||
utils.log("Received message: " .. message)
|
|
||||||
|
|
||||||
-- Check if it's a password attempt
|
-- Check if it's a password attempt (don't log passwords in plaintext)
|
||||||
if message:sub(1, 14) == "IRIS_PASSWORD:" then
|
if message:sub(1, 14) == "IRIS_PASSWORD:" then
|
||||||
|
utils.log("Received password attempt")
|
||||||
local password = message:sub(15)
|
local password = message:sub(15)
|
||||||
HandleIncomingPasswordRequest(password)
|
HandleIncomingPasswordRequest(password)
|
||||||
|
else
|
||||||
|
utils.log("Received message: " .. message)
|
||||||
end
|
end
|
||||||
state.lastReceivedMessage = nil
|
state.lastReceivedMessage = nil
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user