Merge branch 'master' of https://github.com/minetest-mods/irc into HEAD

master
flux 2019-11-23 22:38:51 +00:00
commit 68d6f88900
6 changed files with 13 additions and 7 deletions

View File

@ -138,7 +138,7 @@ irc2.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
})

View File

@ -7,7 +7,6 @@ irc2.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("irc2."..name)
elseif stype == "string" then

View File

@ -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.

View File

@ -122,6 +122,8 @@ function irc2.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]+) (.*)$")
@ -136,6 +138,9 @@ function irc2.hooks.channelChat(msg)
elseif foundleave then
irc2.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
irc2.sendLocal(("* %s@%s %s")
:format(actionnick, msg.user.nick, actionmessage))

View File

@ -27,7 +27,9 @@ if not rawget(_G, "jit") and package.config:sub(1, 1) == "/" then
";/usr/share/lua/5.1/?.lua"..
";/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
end

View File

@ -1 +1,5 @@
name = irc2
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.
"""