added Iris Password system
This commit is contained in:
37
utils.lua
37
utils.lua
@ -136,4 +136,41 @@ function utils.getIrisState()
|
||||
return "NO IRIS"
|
||||
end
|
||||
|
||||
---------------------------------------------
|
||||
-- MESSAGING
|
||||
---------------------------------------------
|
||||
|
||||
function utils.sendVersionMessage()
|
||||
if config.enableMessaging then
|
||||
local message = "SGCS_V" .. config.programVersion
|
||||
gate.sendStargateMessage(message)
|
||||
utils.log("Sent version message: " .. message)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function utils.sendPasswordResponse(success)
|
||||
if config.enableMessaging then
|
||||
if success then
|
||||
gate.sendStargateMessage("IRIS_OPEN")
|
||||
utils.log("Sent iris open confirmation")
|
||||
else
|
||||
gate.sendStargateMessage("IRIS_DENIED")
|
||||
utils.log("Sent iris access denied")
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function utils.sendPasswordAttempt(password)
|
||||
if config.enableMessaging then
|
||||
gate.sendStargateMessage("IRIS_PASSWORD:" .. password)
|
||||
utils.log("Sent password attempt")
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return utils
|
||||
|
||||
Reference in New Issue
Block a user