From 05ab5e9fbd20276da802b047209149f97d606da9 Mon Sep 17 00:00:00 2001 From: rdococ Date: Sat, 21 Sep 2019 14:22:41 +0100 Subject: [PATCH 1/3] Fix message when a player on another server times out (#58) --- hooks.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks.lua b/hooks.lua index 0ac3597..19a85ae 100644 --- a/hooks.lua +++ b/hooks.lua @@ -120,6 +120,8 @@ function irc.hooks.channelChat(msg) text:find("^%*%*%* ([^%s]+) joined the game$") local foundleave, _, leavenick = text:find("^%*%*%* ([^%s]+) left the game$") + local foundtimedout, _, timedoutnick = + text:find("^%*%*%* ([^%s]+) left the game %(Timed out%)$") local foundaction, _, actionnick, actionmessage = text:find("^%* ([^%s]+) (.*)$") @@ -134,6 +136,9 @@ function irc.hooks.channelChat(msg) elseif foundleave then irc.sendLocal(("*** %s left %s") :format(leavenick, msg.user.nick)) + elseif foundtimedout then + irc.sendLocal(("*** %s left %s (Timed out)") + :format(timedoutnick, msg.user.nick)) elseif foundaction then irc.sendLocal(("* %s@%s %s") :format(actionnick, msg.user.nick, actionmessage)) From ac0387786cc9f9e5b44a072e88289041182b6628 Mon Sep 17 00:00:00 2001 From: David Leal Date: Sat, 5 Oct 2019 02:25:05 -0500 Subject: [PATCH 2/3] Fix deprecated functions, update to 5.x (#59) --- botcmds.lua | 2 +- config.lua | 10 ---------- description.txt | 4 ---- init.lua | 3 ++- mod.conf | 4 ++++ 5 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 description.txt diff --git a/botcmds.lua b/botcmds.lua index ec888ea..5d78917 100644 --- a/botcmds.lua +++ b/botcmds.lua @@ -139,7 +139,7 @@ irc.register_bot_command("whereis", { return false, "There is no player named '"..args.."'" end local fmt = "Player %s is at (%.2f,%.2f,%.2f)" - local pos = player:getpos() + local pos = player:get_pos() return true, fmt:format(args, pos.x, pos.y, pos.z) end }) diff --git a/config.lua b/config.lua index 9a5c1fc..2f72066 100644 --- a/config.lua +++ b/config.lua @@ -7,7 +7,6 @@ irc.config = {} local function setting(stype, name, default, required) local value if minetest.settings and minetest.settings.get and minetest.settings.get_bool then - -- The current methods for getting settings if stype == "bool" then value = minetest.settings:get_bool("irc."..name) elseif stype == "string" then @@ -15,15 +14,6 @@ local function setting(stype, name, default, required) elseif stype == "number" then value = tonumber(minetest.settings:get("irc."..name)) end - else - -- The old methods for getting settings for backward compatibility. Deprecated on 0.4.16+ - if stype == "bool" then - value = minetest.setting_getbool("irc."..name) - elseif stype == "string" then - value = minetest.setting_get("irc."..name) - elseif stype == "number" then - value = tonumber(minetest.setting_get("irc."..name)) - end end if value == nil then if required then diff --git a/description.txt b/description.txt deleted file mode 100644 index 58ba37a..0000000 --- a/description.txt +++ /dev/null @@ -1,4 +0,0 @@ -This mod is just a glue between IRC and Minetest. - -It provides two-way communication between the -in-game chat, and an arbitrary IRC channel. diff --git a/init.lua b/init.lua index 62d8fdd..2dfaa7d 100644 --- a/init.lua +++ b/init.lua @@ -110,7 +110,8 @@ end minetest.register_privilege("irc_admin", { description = "Allow IRC administrative tasks to be performed.", - give_to_singleplayer = true + give_to_singleplayer = true, + give_to_admin = true, }) local stepnum = 0 diff --git a/mod.conf b/mod.conf index ba3caea..986c319 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,5 @@ name = irc +description = """ +This mod is just a glue between IRC and Minetest. +It provides two-way communication between the in-game chat, and an arbitrary IRC channel. +""" From 5e3659761b02b5f9c34f40854eafcc27fef1c93a Mon Sep 17 00:00:00 2001 From: Wade Cline Date: Thu, 17 Oct 2019 12:29:02 -0700 Subject: [PATCH 3/3] Add extra library search path (#60) --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2dfaa7d..06e71c3 100644 --- a/init.lua +++ b/init.lua @@ -29,7 +29,8 @@ if not rawget(_G, "jit") and package.config:sub(1, 1) == "/" then ";/usr/share/lua/5.1/?/init.lua" ie.package.cpath = ie.package.cpath.. - ";/usr/lib/lua/5.1/?.so" + ";/usr/lib/lua/5.1/?.so".. + ";/usr/lib64/lua/5.1/?.so" ie.package.cpath = "/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;"..ie.package.cpath