mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Disallow sending to empty recipient
This commit is contained in:
parent
fcef1b9e1c
commit
e9d60b0013
1 changed files with 2 additions and 0 deletions
2
api.lua
2
api.lua
|
@ -51,6 +51,8 @@ function mail.send(m)
|
||||||
table.insert(undeliverable_reason, reason)
|
table.insert(undeliverable_reason, reason)
|
||||||
end
|
end
|
||||||
return false, table.concat(undeliverable_reason, "\n")
|
return false, table.concat(undeliverable_reason, "\n")
|
||||||
|
elseif not next(recipients) then
|
||||||
|
return false, S("You did not specify any valid recipient.")
|
||||||
end
|
end
|
||||||
|
|
||||||
local extra = {}
|
local extra = {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue