mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2025-03-15 02:22:41 +01:00
mail when money transfer
This commit is contained in:
@ -484,8 +484,18 @@ function emeraldbank.wt_receive_fields(player, form, pressed)
|
||||
atm.balance[t.to] = atm.balance[t.to] + t.sum
|
||||
atm.write_transactions()
|
||||
atm.saveaccounts()
|
||||
if minetest.get_modpath("mail") and mail.send then
|
||||
mail.send({
|
||||
from = "Emerald Bank",
|
||||
to = t.to,
|
||||
--cc = "carbon, copy",
|
||||
--bcc = "blind, carbon, copy",
|
||||
subject = S("Payment of @1 emeralds from @2", t.sum, n),
|
||||
body = S("Good news!\n\n@1 has transferred @2 emeralds to your bank account using the Emerald Bank Transfer System.\n\nTransfer description:\n\n@3", n, t.sum, t.desc)
|
||||
})
|
||||
end
|
||||
minetest.chat_send_player(n, S("Payment of @1 to @2 completed", t.sum, t.to))
|
||||
minetest.chat_send_player(n, S("@1, thank you for choosing the Wire Transfer system", n))
|
||||
minetest.chat_send_player(n, S("@1, thank you for choosing the Emerald Bank Transfer system", n))
|
||||
if t.callback then -- run callbacks from mods
|
||||
t.callback(t)
|
||||
end
|
||||
|
Reference in New Issue
Block a user