From 80d5145df5e5707af39d1862c5b9e2b4a246c1b9 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sun, 23 Oct 2022 15:15:49 +0200 Subject: [PATCH] Check privs on form submission --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 271b35e..cb7ebd2 100644 --- a/init.lua +++ b/init.lua @@ -120,6 +120,8 @@ minetest.register_tool(modname .. ":extruder", { minetest.register_on_player_receive_fields(function(player, formname, fields) if formname ~= (modname .. ":settings") then return end + if player == nil then return end + if not lib.check_privs_with_msg(player, "extruder") then return end local inventory = player:get_inventory() local wield_index = player:get_wield_index() -- 2.45.2