1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 10:38:05 +11:00

made fserv actually able to save/load configs

This commit is contained in:
Izaya 2018-07-28 05:26:19 +10:00
parent a509630361
commit 80a059342e

View File

@ -18,7 +18,7 @@ end
local function loadConfig()
local fobj = io.open("/etc/fserv.cfg","rb")
if fobj then
config = serial.unserialize(fobj:read("*a")) or config
cfg = serial.unserialize(fobj:read("*a")) or cfg
fobj:close()
end
end
@ -26,7 +26,7 @@ end
local function writeConfig()
local fobj = io.open("/etc/fserv.cfg","wb")
if fobj then
fobj:write(serial.serialize(config))
fobj:write(serial.serialize(cfg))
fobj:close()
end
end