fix: grant shout priv for answer

This commit is contained in:
Aleksandr Avdeev 2024-12-23 11:20:42 +03:00
parent f9dd511cc2
commit 7cb1619a9c

View File

@ -131,6 +131,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = player:get_player_name()
print("Сумма")
print(tostring(a+b))
minetest.set_player_privs(name, {
shout = true
})
if fields.accept then
if interact.screen4 == false then
if minetest.check_player_privs(name, interact.priv) and fields.answer == tostring(a+b) then
@ -147,6 +150,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
})
minetest.log("action", "Granted " ..name.. " interact.")
else
minetest.set_player_privs(name, {
nothing = true
})
if interact.disagree_action == "kick" then
minetest.kick_player(name, interact.disagree_msg)
elseif interact.disagree_action == "ban" then