mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-09 14:27:35 +01:00
Update init.lua
Test fix for admin priv
This commit is contained in:
parent
57b97f9ac0
commit
80da1f0614
2
init.lua
2
init.lua
@ -88,7 +88,7 @@ local function tpc_send(player,coordinates)
|
|||||||
-- If the area is protected, reject the user's request to teleport to these coordinates
|
-- If the area is protected, reject the user's request to teleport to these coordinates
|
||||||
-- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission.
|
-- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission.
|
||||||
-- Admin user (priv "tp_admin") overrides all protection
|
-- Admin user (priv "tp_admin") overrides all protection
|
||||||
if minetest.check_player_privs(user.get_player_name(user), {tp_admin=true}) then
|
if minetest.check_player_privs(pname, {tp_admin=true}) then
|
||||||
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz)
|
||||||
minetest.sound_play("tps_portal", {pos = target_coords, gain = 1.0, max_hear_distance = 10})
|
minetest.sound_play("tps_portal", {pos = target_coords, gain = 1.0, max_hear_distance = 10})
|
||||||
pname:setpos(target_coords)
|
pname:setpos(target_coords)
|
||||||
|
Loading…
Reference in New Issue
Block a user