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 * backported2aef6adf19
* backported2aef6adf19
This commit is contained in:
parent
861dc596fd
commit
a6c1111c51
@ -10,16 +10,16 @@
|
||||
-----------------------------------------------------
|
||||
local is_46 = minetest.has_feature("add_entity_with_staticdata")
|
||||
|
||||
function get_minetest_config( key )
|
||||
if is_46 then
|
||||
get_minetest_config = function( key )
|
||||
minetest.settings:get( key )
|
||||
end
|
||||
return minetest.settings:get( key )
|
||||
else
|
||||
get_minetest_config = core.setting_get -- backwards compatibility
|
||||
return core.setting_get( key ) -- backwards compatibility
|
||||
end
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user