summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-09-02 19:16:14 -0400
committerShadowNinja <noreply@gmail.com>2013-09-02 19:16:14 -0400
commit4ae050a3ae13d5fc7a01b72fe2576508916e5145 (patch)
treefe9e6bff4c88854e384fb1c26512aa8867d12f41 /init.lua
Initial commit
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..35737fd
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,31 @@
+-- Areas mod by ShadowNinja
+-- Based on node_ownership
+-- License: GPLv2+
+
+areas = {}
+
+areas.startTime = os.clock()
+
+areas.modpath = minetest.get_modpath("areas")
+dofile(areas.modpath.."/settings.lua")
+dofile(areas.modpath.."/api.lua")
+dofile(areas.modpath.."/internal.lua")
+dofile(areas.modpath.."/chatcommands.lua")
+dofile(areas.modpath.."/pos.lua")
+dofile(areas.modpath.."/interact.lua")
+dofile(areas.modpath.."/legacy.lua")
+
+areas:load()
+
+minetest.register_privilege("areas", {description = "Can administer areas"})
+
+if not minetest.registered_privileges[areas.self_protection_privilege] then
+ minetest.register_privilege(areas.self_protection_privilege,
+ {description = "Can protect areas"})
+end
+
+if minetest.setting_getbool("log_mod") then
+ local diffTime = os.clock() - areas.startTime
+ print("[areas] loaded in "..diffTime.."s.")
+end
+