priv gate things + bugfixes

This commit is contained in:
unknown
2022-02-13 10:43:41 -05:00
parent 3e4e65e01b
commit 2593c55ee3
9 changed files with 33 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{
"name": "cd",
"license": "MIT",
"version": 0.1,
"engine": 0.4,
"version": 0.11,
"engine": 0.41,
"help": "move in and out of folders"
}

View File

@ -1,4 +1,7 @@
function cd(pos, input, data)
if not minetest.check_player_privs(data.player, "computers_filesystem") then
return "ERROR: permision denied"
end
local path = computers.devicepath .. "/" .. minetest.hash_node_position(pos) .. data.element.pwd
if input and input ~= "" and not input:find("/") and not input:find("\\") then