fix: grant shout priv for answer
This commit is contained in:
parent
f9dd511cc2
commit
7cb1619a9c
6
init.lua
6
init.lua
@ -131,6 +131,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
print("Сумма")
|
print("Сумма")
|
||||||
print(tostring(a+b))
|
print(tostring(a+b))
|
||||||
|
minetest.set_player_privs(name, {
|
||||||
|
shout = true
|
||||||
|
})
|
||||||
if fields.accept then
|
if fields.accept then
|
||||||
if interact.screen4 == false then
|
if interact.screen4 == false then
|
||||||
if minetest.check_player_privs(name, interact.priv) and fields.answer == tostring(a+b) 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.")
|
minetest.log("action", "Granted " ..name.. " interact.")
|
||||||
else
|
else
|
||||||
|
minetest.set_player_privs(name, {
|
||||||
|
nothing = true
|
||||||
|
})
|
||||||
if interact.disagree_action == "kick" then
|
if interact.disagree_action == "kick" then
|
||||||
minetest.kick_player(name, interact.disagree_msg)
|
minetest.kick_player(name, interact.disagree_msg)
|
||||||
elseif interact.disagree_action == "ban" then
|
elseif interact.disagree_action == "ban" then
|
||||||
|
Loading…
Reference in New Issue
Block a user