Skip to content

Commit ac03877

Browse files
Panquesito7SmallJoker
authored andcommitted
Fix deprecated functions, update to 5.x (#59)
1 parent 05ab5e9 commit ac03877

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

botcmds.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ irc.register_bot_command("whereis", {
139139
return false, "There is no player named '"..args.."'"
140140
end
141141
local fmt = "Player %s is at (%.2f,%.2f,%.2f)"
142-
local pos = player:getpos()
142+
local pos = player:get_pos()
143143
return true, fmt:format(args, pos.x, pos.y, pos.z)
144144
end
145145
})

config.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,13 @@ irc.config = {}
77
local function setting(stype, name, default, required)
88
local value
99
if minetest.settings and minetest.settings.get and minetest.settings.get_bool then
10-
-- The current methods for getting settings
1110
if stype == "bool" then
1211
value = minetest.settings:get_bool("irc."..name)
1312
elseif stype == "string" then
1413
value = minetest.settings:get("irc."..name)
1514
elseif stype == "number" then
1615
value = tonumber(minetest.settings:get("irc."..name))
1716
end
18-
else
19-
-- The old methods for getting settings for backward compatibility. Deprecated on 0.4.16+
20-
if stype == "bool" then
21-
value = minetest.setting_getbool("irc."..name)
22-
elseif stype == "string" then
23-
value = minetest.setting_get("irc."..name)
24-
elseif stype == "number" then
25-
value = tonumber(minetest.setting_get("irc."..name))
26-
end
2717
end
2818
if value == nil then
2919
if required then

description.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ end
110110

111111
minetest.register_privilege("irc_admin", {
112112
description = "Allow IRC administrative tasks to be performed.",
113-
give_to_singleplayer = true
113+
give_to_singleplayer = true,
114+
give_to_admin = true,
114115
})
115116

116117
local stepnum = 0

mod.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
name = irc
2+
description = """
3+
This mod is just a glue between IRC and Minetest.
4+
It provides two-way communication between the in-game chat, and an arbitrary IRC channel.
5+
"""

0 commit comments

Comments
 (0)