mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-05 06:00:29 -04:00
Add ability to use maillist in messages and receive messages from them
This commit is contained in:
parent
85a5e525be
commit
2443cc5dec
4 changed files with 87 additions and 16 deletions
12
gui.lua
12
gui.lua
|
@ -645,10 +645,14 @@ function mail.handle_receivefields(player, formname, fields)
|
|||
local recipients = mail.parse_player_list(fields.to)
|
||||
local isNew = true
|
||||
for r_,recipient in ipairs(recipients) do
|
||||
for c_,contact in ipairs(contacts) do
|
||||
if contact.name == recipient then
|
||||
isNew = false
|
||||
break
|
||||
if mail.split(recipient, "@")[1] == "" then -- in case of maillist
|
||||
isNew = false
|
||||
else
|
||||
for c_,contact in ipairs(contacts) do
|
||||
if contact.name == recipient then
|
||||
isNew = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if isNew then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue