From c79e8fe19eb46ec42285763b6762d72c17830ec6 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 10 Mar 2019 16:53:25 +0100 Subject: [PATCH] password field is marked as private --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 86ddb32..0f463c3 100644 --- a/init.lua +++ b/init.lua @@ -181,6 +181,7 @@ function locks:lock_init( pos, default_formspec ) meta:set_string("allowed_users",""); -- objects can be unlocked by passwords as well (if it is set) meta:set_string("password",""); + meta:mark_as_private("password") -- the last player who entered the right password (to save space this is not a list) meta:set_string("pw_user",""); -- this formspec is presented on right-click for every user @@ -228,6 +229,7 @@ function locks:set_lockdata( pos, data ) meta:set_string("owner", (data.owner or "")); meta:set_string("allowed_users",(data.allowed_users or "")); meta:set_string("password", (data.password or "")); + meta:mark_as_private("password") meta:set_string("pw_user", (data.pw_user or "")); meta:set_string("formspec", (data.formspec or "")); end @@ -598,6 +600,7 @@ function locks:lock_handle_input( pos, formname, fields, player ) meta:set_string( "password", help[2]); + meta:mark_as_private("password") -- reset the list of users who typed the right password meta:set_string("pw_users","");