From: Vanessa Ezekowitz Date: Wed, 18 Dec 2013 01:27:46 +0000 (-0500) Subject: don't write pipeworks config file anymore. if a user needs one, they can X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=dfed550cae5baa07258ebb743a3e3dd5f6b76168;p=zefram%2Fminetest%2Fpipeworks.git don't write pipeworks config file anymore. if a user needs one, they can create it themselves :-) --- diff --git a/init.lua b/init.lua index 178864a..4fa1871 100644 --- a/init.lua +++ b/init.lua @@ -17,22 +17,7 @@ pipeworks.modpath = minetest.get_modpath("pipeworks") dofile(pipeworks.modpath.."/default_settings.txt") -if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") == nil then - - io.input(pipeworks.modpath.."/default_settings.txt") - io.output(pipeworks.worldpath.."/pipeworks_settings.txt") - - local size = 2^13 -- good buffer size (8K) - while true do - local block = io.read(size) - if not block then - io.close() - break - end - io.write(block) - end - -else +if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") ~= nil then dofile(pipeworks.worldpath.."/pipeworks_settings.txt") end