Do not add maillist as a new contact when sending a mail

This commit is contained in:
Athozus 2023-03-25 11:53:33 +01:00
parent 615a102d85
commit 4b2a943799
No known key found for this signature in database
GPG key ID: B50895022E8484BF

View file

@ -705,7 +705,7 @@ function mail.handle_receivefields(player, formname, fields)
local recipients = mail.parse_player_list(fields.to) local recipients = mail.parse_player_list(fields.to)
local isNew = true local isNew = true
for _,recipient in ipairs(recipients) do for _,recipient in ipairs(recipients) do
if recipient:split("@")[1] == "" then -- in case of maillist if recipient == "@" .. recipient:split("@")[1] then -- in case of maillist
isNew = false isNew = false
else else
for _,contact in ipairs(contacts) do for _,contact in ipairs(contacts) do