Update disknet.lua

This commit is contained in:
LDDestroier 2019-05-02 00:17:37 -04:00 committed by GitHub
parent 72ec4a3a6b
commit 2b57f6582c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

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")