Change settime to be privilege based

This makes it so anyone with the privilege settime can change the time
no matter what game mode is currently active.
This commit is contained in:
DannyDark 2012-12-11 18:47:33 +00:00
parent 43e308a815
commit dcddd19fb1
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ unified_inventory.get_formspec = function(player,page)
formspec=formspec.."label[4,.9;Home set to:]"
formspec=formspec.."label[5.7,.9;("..math.floor(home.x)..","..math.floor(home.y)..","..math.floor(home.z)..")]"
end
if minetest.setting_getbool("creative_mode") then
if minetest.check_player_privs(player_name, {settime=true}) then
formspec=formspec.."button[0,2;2,0.5;misc_set_day;Set Day]"
formspec=formspec.."button[2,2;2,0.5;misc_set_night;Set Night]"
end