BlockColor-Engine/builtin/game/privileges.lua

54 lines
1.8 KiB
Lua
Raw Normal View History

-- Minetest: builtin/privileges.lua
2012-04-01 11:37:41 +02:00
--
-- Privileges
--
2015-07-05 14:23:28 +02:00
multicraft.registered_privileges = {}
2012-04-01 11:37:41 +02:00
2015-07-05 14:23:28 +02:00
function multicraft.register_privilege(name, param)
2012-04-01 11:37:41 +02:00
local function fill_defaults(def)
if def.give_to_singleplayer == nil then
def.give_to_singleplayer = true
end
if def.description == nil then
def.description = "(no description)"
end
end
local def = {}
if type(param) == "table" then
def = param
else
def = {description = param}
end
fill_defaults(def)
2015-07-05 14:23:28 +02:00
multicraft.registered_privileges[name] = def
2012-04-01 11:37:41 +02:00
end
2015-07-05 14:23:28 +02:00
multicraft.register_privilege("interact", "Can interact with things and modify the world")
multicraft.register_privilege("teleport", "Can use /teleport command")
multicraft.register_privilege("bring", "Can teleport other players")
multicraft.register_privilege("settime", "Can use /time")
multicraft.register_privilege("privs", "Can modify privileges")
multicraft.register_privilege("basic_privs", "Can modify 'shout' and 'interact' privileges")
multicraft.register_privilege("server", "Can do server maintenance stuff")
multicraft.register_privilege("shout", "Can speak in chat")
multicraft.register_privilege("ban", "Can ban and unban players")
multicraft.register_privilege("kick", "Can kick players")
multicraft.register_privilege("give", "Can use /give and /giveme")
multicraft.register_privilege("password", "Can use /setpassword and /clearpassword")
multicraft.register_privilege("fly", {
2012-04-01 11:37:41 +02:00
description = "Can fly using the free_move mode",
give_to_singleplayer = false,
})
2015-07-05 14:23:28 +02:00
multicraft.register_privilege("fast", {
2012-04-01 11:37:41 +02:00
description = "Can walk fast using the fast_move mode",
give_to_singleplayer = false,
})
2015-07-05 14:23:28 +02:00
multicraft.register_privilege("noclip", {
description = "Can fly through walls",
give_to_singleplayer = false,
})
2015-07-05 14:23:28 +02:00
multicraft.register_privilege("rollback", "Can use the rollback functionality")
2012-04-01 11:37:41 +02:00