From 4eb56588db28b3d34717fc9726284f224059cda0 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 19 Jan 2019 23:56:28 +0000 Subject: [PATCH] Fix rules granting when there's no password --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 54faf8a..92e8d4a 100644 --- a/init.lua +++ b/init.lua @@ -75,9 +75,9 @@ function rules.show(player) if not has_password(pname) then fs = fs .. "box[4,6.5;3.1,0.7;#900]" fs = fs .. "label[4.2,6.6;Please set a password]" - fs = fs .. "button_exit[0.5,6;3.5,2;yes;Okay]" + fs = fs .. "button_exit[0.5,6;3.5,2;ok;Okay]" elseif not can_grant_interact(player) then - fs = fs .. "button_exit[0.5,6;7,2;yes;Okay]" + fs = fs .. "button_exit[0.5,6;7,2;ok;Okay]" else local yes = minetest.formspec_escape("Yes, let me play!") local no = minetest.formspec_escape("No, get me out of here!") @@ -145,7 +145,7 @@ minetest.register_on_player_receive_fields(function(player, form, fields) end local name = player:get_player_name() - if not can_grant_interact(player) then + if not can_grant_interact(player) or not has_password(name) then return true end