aboutsummaryrefslogtreecommitdiff
path: root/init.lua
blob: 990ee0c6c8f6f38a416c580b4f8b11cb2ecc5b71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local http = minetest.request_http_api()
mail = {}
local MP = minetest.get_modpath(minetest.get_current_modname())
mail.webmail = {}
mail.webmail.disallow_banned_players = true 
if http then
	local webmail_url = "http://127.0.0.1:8080"
	local webmail_key = "foo bar baz" -- not used in the mod but might get used in the future.

	if not webmail_url then error("webmail.url is not defined") end
	if not webmail_key then error("webmail.key is not defined") end

	print("[mail] loading webmail-component with endpoint: " .. webmail_url)
	dofile(MP .. "/webmail.lua")
	mail.webmail_init(http, webmail_url, webmail_key)
end