1
0
mirror of https://github.com/LDDestroier/CC/ synced 2025-11-01 16:03:00 +00:00

Update disknet.lua

This commit is contained in:
LDDestroier
2019-05-02 00:17:37 -04:00
committed by GitHub
parent 72ec4a3a6b
commit 2b57f6582c

View File

@@ -96,6 +96,9 @@ end
disknet.send = function(channel, message)
local valid, grr = checkValidChannel(channel)
if valid then
if not fs.exists(fs.combine(disknet.mainPath, tostring(channel))) then
fs.open(fs.combine(disknet.mainPath, tostring(channel)), "w").close()
end
local contents = textutils.unserialize(readFile(fs.combine(disknet.mainPath, tostring(channel))))
if disknet.isOpen(channel) then
local file = fs.open(fs.combine(disknet.mainPath, tostring(channel)), "w")