auth_rx - backported fix get key configuration helper access

* seems something related to syntactic sugar seems
  do not works anymore.. as i asked repect some commits
  at https://notabug.org/TenPlus1/nssm/issues/19
* backported 2aef6adf19
* backported 2aef6adf19
master
mckaygerhard 2023-06-15 23:42:34 -04:00
parent 861dc596fd
commit a6c1111c51
1 changed files with 6 additions and 6 deletions

View File

@ -10,16 +10,16 @@
-----------------------------------------------------
local is_46 = minetest.has_feature("add_entity_with_staticdata")
if is_46 then
get_minetest_config = function( key )
minetest.settings:get( key )
function get_minetest_config( key )
if is_46 then
return minetest.settings:get( key )
else
return core.setting_get( key ) -- backwards compatibility
end
else
get_minetest_config = core.setting_get -- backwards compatibility
end
function convert_ipv4( str )
if not str then str = "127.0.0.1" end
if not str then str = "127.0.0.1" end -- started in local game or load the mod incorrectly
local ref = string.split( str, ".", false )
return tonumber( ref[ 1 ] ) * 16777216 + tonumber( ref[ 2 ] ) * 65536 + tonumber( ref[ 3 ] ) * 256 + tonumber( ref[ 4 ] )
end