fix(inferium-server): computerId should be stringified
This commit is contained in:
parent
efeba6f4cb
commit
cc1d083aa7
@ -1,6 +1,6 @@
|
|||||||
local inferiumPlans = require('config/inferium-plans') -- temporary default plan
|
local inferiumPlans = require('config/inferium-plans') -- temporary default plan
|
||||||
|
|
||||||
local VERSION = "0.2.0"
|
local VERSION = "0.2.1"
|
||||||
|
|
||||||
local INFERIUM_QUERY_PORT = 111
|
local INFERIUM_QUERY_PORT = 111
|
||||||
local INFERIUM_REPLY_PORT = 112
|
local INFERIUM_REPLY_PORT = 112
|
||||||
@ -12,7 +12,7 @@ local modem = peripheral.find("modem") or error("No modem attached", 0)
|
|||||||
modem.open(INFERIUM_QUERY_PORT)
|
modem.open(INFERIUM_QUERY_PORT)
|
||||||
|
|
||||||
local function getPlanForComputer(computerId)
|
local function getPlanForComputer(computerId)
|
||||||
return inferiumPlans[computerId] or defaultPlan
|
return inferiumPlans[tostring(computerId)] or defaultPlan
|
||||||
end
|
end
|
||||||
|
|
||||||
local function messageReceived(message)
|
local function messageReceived(message)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user