fix deprecation warnings

* backported c8b8ca967e
This commit is contained in:
mckaygerhard 2023-06-08 23:40:23 -04:00
parent 48737b82a1
commit e1ddc0ffaf

View File

@ -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 )