chore(inferium-server): change printed messages
This commit is contained in:
parent
87188093f4
commit
8f14f48914
@ -1,5 +1,7 @@
|
||||
local inferiumPlan = require('config/inferium-plan') -- temporary default plan
|
||||
|
||||
local VERSION = "0.1.0"
|
||||
|
||||
local INFERIUM_QUERY_PORT = 111
|
||||
local INFERIUM_REPLY_PORT = 112
|
||||
|
||||
@ -16,7 +18,7 @@ local function messageReceived(message)
|
||||
local payload = message.payload or {}
|
||||
|
||||
if payload.computerId == nil then
|
||||
print('Error: no computerId found in payload')
|
||||
print('getplan error: no computerId found in received payload')
|
||||
return nil
|
||||
end
|
||||
|
||||
@ -27,7 +29,7 @@ local function messageReceived(message)
|
||||
end
|
||||
end
|
||||
|
||||
print('Inferium server listening on port ' .. INFERIUM_QUERY_PORT)
|
||||
print('> inferium server v' .. VERSION .. ' listening on port ' .. INFERIUM_QUERY_PORT)
|
||||
|
||||
while true do
|
||||
local _, _, channel, replyChannel, rawMessage, _ = os.pullEvent("modem_message")
|
||||
@ -40,7 +42,7 @@ while true do
|
||||
local rawReplyMessage = textutils.serialize(replyMessage)
|
||||
modem.transmit(INFERIUM_REPLY_PORT, INFERIUM_QUERY_PORT, rawReplyMessage)
|
||||
else
|
||||
print('warning: unknown message')
|
||||
print('warning: unknown message received')
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user