Skip to content

Commit

Permalink
Permit start composition of a message by passing receivers into /mail…
Browse files Browse the repository at this point in the history
… command (close #101)
  • Loading branch information
Athozus committed Jun 18, 2023
1 parent d53b074 commit 8dadd80
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions chatcommands.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
minetest.register_chatcommand("mail",{
description = "Open the mail interface",
func = function(name)
mail.show_mail_menu(name)
func = function(name, param)
if #param > 0 then -- if param is not empty
mail.show_compose(name, param) -- make a new message
else
mail.show_mail_menu(name) -- show main menu
end
end
})

0 comments on commit 8dadd80

Please sign in to comment.