Mercurial > prosody-modules
diff mod_lastlog2/mod_lastlog2.lua @ 4103:ecc6ad057383
mod_lastlog2: Fix reporting of IP address (thanks Ge0rG)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Sep 2020 16:48:28 +0200 |
parents | 4e7ff27c212c |
children | 7b722955c59b |
line wrap: on
line diff
--- a/mod_lastlog2/mod_lastlog2.lua Fri Sep 11 16:45:47 2020 +0200 +++ b/mod_lastlog2/mod_lastlog2.lua Fri Sep 11 16:48:28 2020 +0200 @@ -60,8 +60,8 @@ for event, data in pairs(lastlog) do print(("Last %s: %s"):format(event, data.timestamp and os.date("%Y-%m-%d %H:%M:%S", data.timestamp) or "<unknown>")); - if lastlog.ip then - print("IP address: "..lastlog.ip); + if data.ip then + print("IP address: "..data.ip); end end else