Use builtin split func

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
This commit is contained in:
Athozus 2023-03-11 14:18:13 +01:00
parent 03191fa406
commit 30a11784a9
No known key found for this signature in database
GPG key ID: B50895022E8484BF

View file

@ -7,7 +7,7 @@ and add individual player names to recipient list
function mail.normalize_players_and_add_recipients(field, recipients, undeliverable)
local order = mail.parse_player_list(field)
for _, recipient_name in ipairs(order) do
if mail.split(recipient_name, "@")[1] == "" then -- in case of maillist
if recipient_name:split("@")[1] == "" then -- in case of maillist
recipients[recipient_name] = true
else -- in case of playerˇ
if not minetest.player_exists(recipient_name) then