forked from Sokomine/yl_speak_up
added security priv checks for staff functions
This commit is contained in:
parent
2096912134
commit
1e1e4d8312
@ -1741,6 +1741,9 @@ minetest.register_on_player_receive_fields(
|
|||||||
if formname ~= "yl_speak_up:optiondialog" then
|
if formname ~= "yl_speak_up:optiondialog" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if(not(minetest.check_player_privs(player, {npc_master=true}))) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local pname = player:get_player_name()
|
local pname = player:get_player_name()
|
||||||
local n_id = yl_speak_up.speak_to[pname].n_id
|
local n_id = yl_speak_up.speak_to[pname].n_id
|
||||||
@ -1902,6 +1905,9 @@ minetest.register_on_player_receive_fields(
|
|||||||
if formname ~= "yl_speak_up:setdialog" then
|
if formname ~= "yl_speak_up:setdialog" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if(not(minetest.check_player_privs(player, {npc_master=true}))) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local pname = player:get_player_name()
|
local pname = player:get_player_name()
|
||||||
local n_id = yl_speak_up.speak_to[pname].n_id
|
local n_id = yl_speak_up.speak_to[pname].n_id
|
||||||
|
Loading…
Reference in New Issue
Block a user