From f104fa41f39cb5c7ee43f4653144b6a7d26d569d Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 18 Oct 2015 00:40:56 +1100 Subject: [PATCH] Initial work on the actual bot. --- init.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..3b25d8d --- /dev/null +++ b/init.lua @@ -0,0 +1,18 @@ +local socket = require "socket" +local serialization = require "serialization" + +local config = {} + +function loadconfig() + local f = io.open("config.lua","rb") + local content = f:read("*a") + f:close() + config = serialization.unserialize(dat) +end + +function saveconfig() + local newconfig = serialization.serialize(config) + local f = io.open("config.lua","rb") + f:write(newconfig) + f:close() +end