fix(inferium-server): computerId should be stringified

This commit is contained in:
Guillaume ARM 2024-05-21 19:12:03 +02:00
parent efeba6f4cb
commit cc1d083aa7

View File

@ -1,6 +1,6 @@
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_REPLY_PORT = 112
@ -12,7 +12,7 @@ local modem = peripheral.find("modem") or error("No modem attached", 0)
modem.open(INFERIUM_QUERY_PORT)
local function getPlanForComputer(computerId)
return inferiumPlans[computerId] or defaultPlan
return inferiumPlans[tostring(computerId)] or defaultPlan
end
local function messageReceived(message)