mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Fix mtt issue
This commit is contained in:
parent
c942dc1a84
commit
6858425bd9
2 changed files with 4 additions and 3 deletions
4
init.lua
4
init.lua
|
@ -24,6 +24,6 @@ dofile(MP .. "/onjoin.lua")
|
|||
-- migrate storage
|
||||
mail.migrate()
|
||||
|
||||
if minetest.get_modpath("mtt") then
|
||||
--if minetest.get_modpath("mtt") then
|
||||
dofile(MP .. "/mtt.lua")
|
||||
end
|
||||
--end
|
||||
|
|
|
@ -38,6 +38,7 @@ end
|
|||
|
||||
-- migrate from v2 to v3 database
|
||||
function mail.migrate_v2_to_v3()
|
||||
minetest.mkdir(mail.maildir) -- if necessary (eg. first login)
|
||||
minetest.log("info", "[mail] Migration from v2 to v3 database")
|
||||
minetest.after(0,function()
|
||||
for playername, value in minetest.get_auth_handler().iterate() do
|
||||
|
@ -84,7 +85,7 @@ end
|
|||
|
||||
function mail.migrate_contacts(playername)
|
||||
local gen_file_v1 = io.open(minetest.get_worldpath().."/mail.db", "r")
|
||||
if file then
|
||||
if gen_file_v1 then
|
||||
mail.migrate_contacts_v1_to_v2()
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue