From e1ddc0ffafa968da5f7ca0c7811b2676a598f4c2 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 8 Jun 2023 23:40:23 -0400 Subject: [PATCH] fix deprecation warnings * backported https://github.com/clinew/auth_rx/commit/c8b8ca967e1407b70b41d6df07ac6b0e65975a27 --- helpers.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helpers.lua b/helpers.lua index 46fdc7b..226b20b 100644 --- a/helpers.lua +++ b/helpers.lua @@ -8,8 +8,15 @@ ----------------------------------------------------- -- Global Helper Functions ----------------------------------------------------- +local is_46 = minetest.has_feature("add_entity_with_staticdata") -get_minetest_config = core.setting_get -- backwards compatibility +if is_46 then + get_minetest_config = function( key ) + minetest.settings:get( key ) + end +else + get_minetest_config = core.setting_get -- backwards compatibility +end function convert_ipv4( str ) local ref = string.split( str, ".", false )