[whoison] Handle missing lastseen

This commit is contained in:
LeMagnesium 2018-02-10 21:20:54 +01:00
parent c22c10047f
commit 33c7bad24e
No known key found for this signature in database
GPG Key ID: A54DDB5272C51E8B

View File

@ -58,7 +58,7 @@ function whoison.updateStats(name)
end end
function whoison.updateFormat(name) function whoison.updateFormat(name)
if ( type(whoison.lastseen[name]) ~= "table" ) then if ( whoison.lastseen and type(whoison.lastseen[name]) ~= "table" ) then
-- update old data to new format -- update old data to new format
minetest.log("action",name.." lastseen is not a table... fixing...") minetest.log("action",name.." lastseen is not a table... fixing...")
local lo = whoison.lastseen[name] local lo = whoison.lastseen[name]