Merge branch 'master' of https://github.com/minetest-mods/irc into HEAD
This commit is contained in:
commit
68d6f88900
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
|
@ -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.
|
@ -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))
|
||||
|
4
init.lua
4
init.lua
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user