mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-07 21:47:30 +01:00
Tweaked code
This commit is contained in:
parent
a0845d38ce
commit
6054324e72
6
init.lua
6
init.lua
@ -91,8 +91,6 @@ end
|
||||
|
||||
function tpr_send(sender, receiver)
|
||||
if minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||
-- Write name values to list and clear old values.
|
||||
tpr_list[receiver] = sender
|
||||
-- Teleport timeout delay
|
||||
minetest.after(timeout_delay, clear_tpr_list, receiver)
|
||||
if receiver == "" then
|
||||
@ -103,6 +101,7 @@ function tpr_send(sender, receiver)
|
||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||
return
|
||||
end
|
||||
tpr_list[receiver] = sender
|
||||
tpr_accept(receiver)
|
||||
minetest.chat_send_player(sender, S("You are teleporting to @1.", receiver))
|
||||
return
|
||||
@ -131,8 +130,6 @@ end
|
||||
|
||||
function tphr_send(sender, receiver)
|
||||
if minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||
-- Write name values to list and clear old values.
|
||||
tphr_list[receiver] = sender
|
||||
-- Teleport timeout delay
|
||||
minetest.after(timeout_delay, clear_tphr_list, receiver)
|
||||
if receiver == "" then
|
||||
@ -143,6 +140,7 @@ function tphr_send(sender, receiver)
|
||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||
return
|
||||
end
|
||||
tphr_list[receiver] = sender
|
||||
tpr_accept(receiver)
|
||||
minetest.chat_send_player(sender, S("@1 is teleporting to you.", receiver))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user