This change avoids 21 deprecation warnings in debug.txt on every server start

2018-05-29 23:46:10: WARNING[Main]: WARNING: minetest.setting_* functions are deprecated.  Use methods on the minetest.settings object.
This commit is contained in:
D Tim Cummings 2018-06-12 12:34:11 +10:00
parent f57bdba5e9
commit 84116fb6ed
1 changed files with 3 additions and 3 deletions

View File

@ -7,11 +7,11 @@ irc.config = {}
local function setting(stype, name, default, required)
local value
if stype == "bool" then
value = minetest.setting_getbool("irc."..name)
value = minetest.settings:get_bool("irc."..name)
elseif stype == "string" then
value = minetest.setting_get("irc."..name)
value = minetest.settings:get("irc."..name)
elseif stype == "number" then
value = tonumber(minetest.setting_get("irc."..name))
value = tonumber(minetest.settings:get("irc."..name))
end
if value == nil then
if required then