forked from minetest-mods/camera
Add camera privilege in order to use camera commands
This commit is contained in:
parent
ca268ec9b9
commit
e106ac96f9
4
init.lua
4
init.lua
@ -1,3 +1,4 @@
|
||||
minetest.register_privilege("camera", { description = "Can use camera commands" })
|
||||
local recordings = {}
|
||||
|
||||
-- [function] Load recordings
|
||||
@ -251,6 +252,9 @@ minetest.register_chatcommand("camera", {
|
||||
description = "Manipulate recording",
|
||||
params = "<option> <value>",
|
||||
func = function(name, param)
|
||||
if not minetest.check_player_privs(name, { camera = true }) then
|
||||
return false, "You need camera privilege!"
|
||||
end
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local param1, param2 = param:split(" ")[1], param:split(" ")[2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user