mirror of
https://git.phreedom.club/localhost_frssoft/fediauth
synced 2025-07-21 14:44:50 -04:00
fork creation done
This commit is contained in:
parent
376d163d08
commit
3466db227f
24 changed files with 416 additions and 1652 deletions
29
init.lua
29
init.lua
|
@ -1,25 +1,28 @@
|
|||
local MP = minetest.get_modpath("otp")
|
||||
local MP = minetest.get_modpath("fediauth")
|
||||
local http = minetest.request_http_api()
|
||||
|
||||
-- sanity checks
|
||||
assert(type(minetest.encode_png) == "function")
|
||||
|
||||
otp = {
|
||||
fediauth = {
|
||||
-- mod storage
|
||||
storage = minetest.get_mod_storage(),
|
||||
|
||||
-- baseXX functions
|
||||
basexx = loadfile(MP.."/basexx.lua")(),
|
||||
|
||||
-- qr code
|
||||
qrcode = loadfile(MP.."/qrencode.lua")().qrcode
|
||||
}
|
||||
|
||||
dofile(MP.."/functions.lua")
|
||||
dofile(MP.."/onboard.lua")
|
||||
dofile(MP.."/join.lua")
|
||||
dofile(MP.."/privs.lua")
|
||||
dofile(MP.."/priv_revoke.lua")
|
||||
|
||||
if minetest.get_modpath("mtt") and mtt.enabled then
|
||||
dofile(MP.."/functions.spec.lua")
|
||||
dofile(MP.."/mastoapi.lua")
|
||||
local instance = minetest.settings:get("fediauth.instance")
|
||||
local key = minetest.settings:get("fediauth.api_token")
|
||||
if not instance or not key then
|
||||
minetest.log("warning", "[fediauth] For working fediauth you should specify fediauth.instance and fediauth.api_token")
|
||||
else
|
||||
mastoapi_init(http, instance, key)
|
||||
dofile(MP.."/functions.lua")
|
||||
dofile(MP.."/onboard.lua")
|
||||
dofile(MP.."/join.lua")
|
||||
dofile(MP.."/privs.lua")
|
||||
dofile(MP.."/priv_revoke.lua")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue