21 lines
376 B
Lua
21 lines
376 B
Lua
local net = require('libs/net')
|
|
|
|
local notify = {}
|
|
|
|
local DEFAULT_PREFIX = 'chatBox'
|
|
|
|
notify.NOTIFY_SERVER = 'notify.com'
|
|
|
|
notify.sendChatMessage = function(message, prefix)
|
|
prefix = prefix or DEFAULT_PREFIX
|
|
|
|
return net.sendQuery(notify.NOTIFY_SERVER, {
|
|
type = 'notify-chat',
|
|
payload = {
|
|
prefix = prefix,
|
|
message = message
|
|
}
|
|
})
|
|
end
|
|
|
|
return notify |