diff options
Diffstat (limited to 'xban2/gui.lua')
-rw-r--r-- | xban2/gui.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xban2/gui.lua b/xban2/gui.lua index fb0c1df..d3306e2 100644 --- a/xban2/gui.lua +++ b/xban2/gui.lua @@ -100,6 +100,11 @@ end minetest.register_on_player_receive_fields(function(player, formname, fields) if formname ~= FORMNAME then return end local name = player:get_player_name() + if not minetest.check_player_privs(name, { ban=true }) then + minetest.log("warning", + "[xban2] Received fields from unauthorized user: "..name) + return + end local state = get_state(name) if fields.player then local t = minetest.explode_textlist_event(fields.player) @@ -128,6 +133,7 @@ end) minetest.register_chatcommand("xban_gui", { description = "Show XBan GUI", params = "", + privs = { ban=true, }, func = function(name, params) minetest.show_formspec(name, FORMNAME, make_fs(name)) end, |