mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-08 14:07:28 +01:00
Improve "/tpn"
This commit warns the player when they denied a request. It also tells players what "/tpn" does, the usage. Tested with MT/MTG 5.0.1 and works fine (no errors/bugs found). If there's any bug/error/typo, please tell me, so, I can fix it.
This commit is contained in:
parent
b583c5c637
commit
56bdc0e30c
14
init.lua
14
init.lua
@ -270,13 +270,17 @@ end
|
|||||||
|
|
||||||
function tpr_deny(name)
|
function tpr_deny(name)
|
||||||
if tpr_list[name] then
|
if tpr_list[name] then
|
||||||
minetest.chat_send_player(tpr_list[name], S("Teleport request denied."))
|
name2 = tpr_list[name]
|
||||||
|
minetest.chat_send_player(name2, S("Teleport request denied."))
|
||||||
|
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
||||||
tpr_list[name] = nil
|
tpr_list[name] = nil
|
||||||
return
|
elseif tphr_list[name] then
|
||||||
end
|
name2 = tphr_list[name]
|
||||||
if tphr_list[name] then
|
minetest.chat_send_player(name2, S("Teleport request denied."))
|
||||||
minetest.chat_send_player(tphr_list[name], S("Teleport request denied."))
|
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
||||||
tphr_list[name] = nil
|
tphr_list[name] = nil
|
||||||
|
else
|
||||||
|
minetest.chat_send_player(name, S("Usage: /tpn allows you to deny teleport requests sent to you by other players."))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user