mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-04 21:50:28 -04:00
Receive player messages from global storage
This commit is contained in:
parent
0d69f0242b
commit
128b209067
2 changed files with 24 additions and 10 deletions
16
api.lua
16
api.lua
|
@ -85,7 +85,6 @@ function mail.send(...)
|
|||
|
||||
-- form the actual mail
|
||||
local msg = {
|
||||
unread = true,
|
||||
sender = m.from,
|
||||
to = m.to,
|
||||
cc = m.cc,
|
||||
|
@ -112,3 +111,18 @@ function mail.send(...)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mail.split(str, delimiter) -- flux split function
|
||||
local rv = {}
|
||||
local i, j = str:find(delimiter, nil, true)
|
||||
|
||||
while i do
|
||||
table.insert(rv, str:sub(1, i - 1))
|
||||
str = str:sub(j + 1)
|
||||
i, j = str:find(delimiter, nil, true)
|
||||
end
|
||||
|
||||
table.insert(rv, str)
|
||||
|
||||
return rv
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue