-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.lua
More file actions
33 lines (26 loc) · 762 Bytes
/
Copy pathinit.lua
File metadata and controls
33 lines (26 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
local modpath = minetest.get_modpath("qos")
QoS = {
modpath = modpath,
-- List of mods wrapped with QoS
http_mods_enabled = {},
-- List of mods not wrapped with QoS
http_mods_bypass = {},
data = {},
}
QoS._config = dofile(modpath .. "/config.lua")
if QoS._config.curl_parallel_limit < 2 then
-- QoS could be used with curl_parallel_limit = 1 too but in that case real problem is elsewhere
dofile(modpath .. "/noop.lua")
return
end
if QoS.config("register_chatcommands") then
dofile(modpath .. "/commands.lua")
end
dofile(modpath .. "/main.lua")
minetest.register_on_mods_loaded(function()
for modname in pairs(QoS._config.http_mods) do
if not QoS.http_mods_enabled[modname] then
table.insert(QoS.http_mods_bypass, modname)
end
end
end)