diff options
author | sfan5 <sfan5@live.de> | 2017-05-13 11:31:59 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2017-05-13 11:51:36 +0200 |
commit | ea465f8fe430ee8d0c6e597bdfb180a8de1ca3a6 (patch) | |
tree | dbaa02f48454b6683c74a9cd1d680adf5008f0f7 | |
parent | 0ce45a5900a7ae3ff952a9988df73c0a578f09ea (diff) |
Remove useless privilege checks
This is covered by the privs = {...},
-rw-r--r-- | worldedit_commands/init.lua | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 12c296c..a62efb6 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -1123,11 +1123,6 @@ minetest.register_chatcommand("/lua", { description = "Executes <code> as a Lua chunk in the global namespace",
privs = {worldedit=true, server=true},
func = function(name, param)
- local admin = minetest.setting_get("name")
- if not admin or not name == admin then
- worldedit.player_notify(name, "this command can only be run by the server administrator")
- return
- end
local err = worldedit.lua(param)
if err then
worldedit.player_notify(name, "code error: " .. err)
@@ -1142,12 +1137,6 @@ minetest.register_chatcommand("/luatransform", { description = "Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region",
privs = {worldedit=true, server=true},
func = safe_region(function(name, param)
- local admin = minetest.setting_get("name")
- if not admin or not name == admin then
- worldedit.player_notify(name, "this command can only be run by the server administrator")
- return
- end
-
local err = worldedit.luatransform(worldedit.pos1[name], worldedit.pos2[name], param)
if err then
worldedit.player_notify(name, "code error: " .. err, false)
|