mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer Better clarify account login process in Lua API documentation Change initial timestamp for newly registered accounts to -1
This commit is contained in:
parent
037422fdba
commit
15ba75e4cf
10 changed files with 81 additions and 46 deletions
|
@ -1068,7 +1068,7 @@ core.register_chatcommand("last-login", {
|
|||
param = name
|
||||
end
|
||||
local pauth = core.get_auth_handler().get_auth(param)
|
||||
if pauth and pauth.last_login then
|
||||
if pauth and pauth.last_login and pauth.last_login ~= -1 then
|
||||
-- Time in UTC, ISO 8601 format
|
||||
return true, "Last login time was " ..
|
||||
os.date("!%Y-%m-%dT%H:%M:%SZ", pauth.last_login)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue