handler_delete.lua 217 B

123456789
  1. -- remove mail
  2. function mail.handlers.delete(playername, index)
  3. local messages = mail.getMessages(playername)
  4. if messages[index] then
  5. table.remove(messages, index)
  6. end
  7. mail.setMessages(playername, messages)
  8. end