mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Change last-login
command to show player name in output (#10263)
This commit is contained in:
parent
f92a393f6f
commit
abfea69e5f
@ -1070,10 +1070,10 @@ core.register_chatcommand("last-login", {
|
|||||||
local pauth = core.get_auth_handler().get_auth(param)
|
local pauth = core.get_auth_handler().get_auth(param)
|
||||||
if pauth and pauth.last_login and pauth.last_login ~= -1 then
|
if pauth and pauth.last_login and pauth.last_login ~= -1 then
|
||||||
-- Time in UTC, ISO 8601 format
|
-- Time in UTC, ISO 8601 format
|
||||||
return true, "Last login time was " ..
|
return true, param.."'s last login time was " ..
|
||||||
os.date("!%Y-%m-%dT%H:%M:%SZ", pauth.last_login)
|
os.date("!%Y-%m-%dT%H:%M:%SZ", pauth.last_login)
|
||||||
end
|
end
|
||||||
return false, "Last login time is unknown"
|
return false, param.."'s last login time is unknown"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user