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
1 changed files with 6 additions and 0 deletions

View File

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