Skip to content

Commit

Permalink
Remove useless privilege checks
Browse files Browse the repository at this point in the history
This is covered by the privs = {...},
  • Loading branch information
sfan5 committed May 13, 2017
1 parent 0ce45a5 commit ea465f8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions worldedit_commands/init.lua
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ea465f8

Please sign in to comment.