minetest-mods / irc

IRC Mod for Minetest
BSD 2-Clause "Simplified" License
43 stars 31 forks source link

Avoid 21 deprecation warnings #47

Closed timcu closed 6 years ago

timcu commented 6 years ago

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.

kaeza commented 6 years ago

Can you make a set of local functions that check for the settings object existence and defer to setting_get, etc. if missing? That would keep backwards compatibility. (As an aside, this mod worked on 0.4.5 (!) last time I checked)

timcu commented 6 years ago

Thanks for your suggestion @kaeza. It was already in a local function so I have converted local function to first test for existence of new methods.

kaeza commented 6 years ago

Thank you!