Save last position of banned users.

Requested by shadowzone and VanessaE.
This commit is contained in:
Diego Martinez 2014-05-23 05:14:28 -03:00
parent ccab1f35c7
commit a79e7a6419

View File

@ -86,6 +86,7 @@ function xban.ban_player(player, source, expires, reason) --> bool, err
if ip then if ip then
e.names[ip] = true e.names[ip] = true
end end
e.last_pos = pl:getpos()
end end
e.reason = reason e.reason = reason
e.time = rec.time e.time = rec.time
@ -232,6 +233,11 @@ minetest.register_chatcommand("xban_record", {
minetest.chat_send_player(name, minetest.chat_send_player(name,
("[%s]: %s"):format(os.date("%c", e.time), msg)) ("[%s]: %s"):format(os.date("%c", e.time), msg))
end end
if e.last_pos then
minetest.chat_send_player(name,
("[%s]: User was last seen at %s"):format(
minetest.pos_to_string(e.last_pos)))
end
end, end,
}) })