From ad4e151184bc4abb3087b8fd45377accc88c0114 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com> Date: Fri, 14 May 2021 07:43:38 +0200 Subject: [PATCH] use "minetest.get_modpath" to detect the qos mod --- init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 1728664..45d00af 100644 --- a/init.lua +++ b/init.lua @@ -44,9 +44,11 @@ if minetest.get_modpath("bones") then dofile(MP.."/bones.lua") end -local QoS --- optional mapserver-bridge stuff below -local http = QoS and QoS(minetest.request_http_api(), 2) or minetest.request_http_api() +local http = minetest.request_http_api() +if minetest.get_modpath("qos") and http then + -- use qos-wrapped http + http = QoS(http, 2) +end if http then -- check if the mapserver.json is in the world-folder -- GitLab