Add ability to use maillist in messages and receive messages from them

This commit is contained in:
Athozus 2023-03-01 19:37:08 +01:00
parent 85a5e525be
commit 2443cc5dec
No known key found for this signature in database
GPG key ID: B50895022E8484BF
4 changed files with 87 additions and 16 deletions

12
gui.lua
View file

@ -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