add contacts dir, leave mail files as is

- restructured storage.lua so reading/writing json is not duplicated
- when a player joins and has no contacts file yet, automatically add all players he wrote to
This commit is contained in:
Peter Nerlich 2020-08-10 18:29:11 +02:00
parent 498ef84026
commit f82c3d2b82
4 changed files with 78 additions and 11 deletions

View file

@ -16,4 +16,6 @@ minetest.register_on_joinplayer(function(player)
end
end, player:get_player_name())
mail.migrate_contacts(player:get_player_name())
end)