~fgaz/minetest-last_login_signs

25c081e5cd2c4bb461000fd4db94c997c3320d7a — Francesco Gazzetta 8 months ago 413d35b v1.0.3
Avoid warning when deserializing missing players list

Empty string gets deserialized to nil (what we want).
nil gives a warning (and also gets deserialized to nil).
1 files changed, 1 insertions(+), 1 deletions(-)

M init.lua
M init.lua => init.lua +1 -1
@@ 47,7 47,7 @@ end
function last_login_signs.update_sign(pos, node)
  if not is_last_login_sign(node.name) then return end
  local meta = minetest.get_meta(pos)
  local player_names = minetest.deserialize(meta:get("last_login_signs:players"), true)
  local player_names = minetest.deserialize(meta:get_string("last_login_signs:players"), true)
  local text = ""
  if player_names and next(player_names) then
    local auth_handler = core.get_auth_handler()