]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix worldedit_gui_lua privs
authortenplus1 <tenplus1@users.noreply.github.com>
Sat, 13 May 2017 08:25:51 +0000 (09:25 +0100)
committersfan5 <sfan5@live.de>
Sat, 13 May 2017 09:17:45 +0000 (11:17 +0200)
This fixes the worldedit_gui_lua feature so that it requires certain privs to run.

worldedit_gui/functionality.lua

index 5cbf8fa67680deaf32d3f944edd747110f438e78..fa2559a884350055528c0fdd43a231f1ab62e877 100644 (file)
@@ -699,7 +699,7 @@ worldedit.register_gui_handler("worldedit_gui_save_load", function(name, fields)
 end)\r
 \r
 worldedit.register_gui_function("worldedit_gui_lua", {\r
-       name = "Run Lua",\r
+       name = "Run Lua", privs = minetest.chatcommands["/clearobjects"].privs,\r
        get_formspec = function(name)\r
                local code = gui_code[name]\r
                return "size[8,6.5]" .. worldedit.get_formspec_header("worldedit_gui_lua") ..\r