From ebe82bd4bf73977b6d94635d772b802f16072f9f Mon Sep 17 00:00:00 2001 From: Izaya Date: Wed, 25 Apr 2018 03:20:57 +1000 Subject: [PATCH] fix computer.address on R1 --- KittenOS/apps/svc-minitel.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/KittenOS/apps/svc-minitel.lua b/KittenOS/apps/svc-minitel.lua index 937efb4..a48d0cd 100644 --- a/KittenOS/apps/svc-minitel.lua +++ b/KittenOS/apps/svc-minitel.lua @@ -6,6 +6,11 @@ neo.requireAccess("s.h.modem_message","pulling packets") local processes = {} local hooks = {} local computer = {["uptime"]=os.uptime,["address"]=os.address} -- wrap computer so the OpenOS code more or less works + +if not computer.address then -- R1 compatibility + computer.address = neo.requireAccess("k.computer","get address").address +end + local event = {} function event.timer() end @@ -45,6 +50,8 @@ local event = require "event" local component = require "component" local computer = require "computer" ]]-- + + local hostname = computer.address():sub(1,8) local listener = false local dbug = true