From d47e87e390b018ac5510bb2143eb0e66f6bc2eeb Mon Sep 17 00:00:00 2001 From: Diego Martinez Date: Wed, 21 May 2014 07:07:37 -0300 Subject: Allow importing old databases. Currently: - Minetest (`ipban.txt') - xban v1 (`players.iplist') --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index f255283..603d060 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,7 @@ -xban = { } +xban = { MP = minetest.get_modpath(minetest.get_current_modname()) } -local MP = minetest.get_modpath(minetest.get_current_modname()) - -dofile(MP.."/serialize.lua") +dofile(xban.MP.."/serialize.lua") local db = { } local tempbans = { } @@ -262,3 +260,5 @@ minetest.register_on_shutdown(save_db) minetest.after(SAVE_INTERVAL, save_db) load_db() xban.db = db + +dofile(xban.MP.."/dbimport.lua") -- cgit v1.2.3