mail/mtt.lua

14 lines
384 B
Lua
Raw Normal View History

2022-08-02 14:56:32 +02:00
mtt.register("send mail", function(callback)
2023-02-23 23:31:01 +01:00
-- create "player2"
local auth_handler = minetest.get_auth_handler()
auth_handler.set_password("player2", "")
2022-08-02 14:56:32 +02:00
-- send a mail
mail.send("player1", "player2", "something", "blah")
-- check the receivers inbox
local list2 = mail.getMessages("player2")
assert(list2 ~= nil and #list2 > 0)
callback()
end)