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

@ -8,6 +8,7 @@ mail = {
-- mail directory
maildir = minetest.get_worldpath().."/mails",
contactsdir = minetest.get_worldpath().."/mails/contacts",
-- allow item/node attachments
allow_attachments = minetest.settings:get("mail.allow_attachments") == "true",