mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-15 18:56:47 -04:00
Fix strings (translations and checks)
This commit is contained in:
parent
720029a73e
commit
95ab299016
9 changed files with 180 additions and 114 deletions
11
storage.lua
11
storage.lua
|
@ -178,6 +178,17 @@ function mail.get_contacts(playername)
|
|||
return entry.contacts
|
||||
end
|
||||
|
||||
-- get a contact
|
||||
function mail.get_contact(playername, contactname)
|
||||
local entry = mail.get_storage_entry(playername)
|
||||
for _, existing_contact in ipairs(entry.contacts) do
|
||||
if existing_contact.name == contactname then
|
||||
return existing_contact
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- returns the maillists of a player
|
||||
function mail.get_maillists(playername)
|
||||
local entry = mail.get_storage_entry(playername)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue