@@ -1051,6 +1051,12 @@ minetest.register_chatcommand("/lua", {
1051
1051
description = " Executes <code> as a Lua chunk in the global namespace" ,
1052
1052
privs = {worldedit = true , server = true },
1053
1053
func = function (name , param )
1054
+ local admin = minetest .setting_get (" name" )
1055
+ if not admin or not name == admin then
1056
+ worldedit .player_notify (name , " This command can only"
1057
+ .. " be run by the server administrator" )
1058
+ return
1059
+ end
1054
1060
local err = worldedit .lua (param )
1055
1061
if err then
1056
1062
worldedit .player_notify (name , " code error: " .. err )
@@ -1065,6 +1071,12 @@ minetest.register_chatcommand("/luatransform", {
1065
1071
description = " Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region" ,
1066
1072
privs = {worldedit = true , server = true },
1067
1073
func = function (name , param )
1074
+ local admin = minetest .setting_get (" name" )
1075
+ if not admin or not name == admin then
1076
+ worldedit .player_notify (name , " This command can only"
1077
+ .. " be run by the server administrator" )
1078
+ return
1079
+ end
1068
1080
local pos1 , pos2 = worldedit .pos1 [name ], worldedit .pos2 [name ]
1069
1081
if pos1 == nil or pos2 == nil then
1070
1082
worldedit .player_notify (name , " no region selected" )
0 commit comments