mirror of
https://github.com/minetest-mods/irc.git
synced 2025-06-29 22:50:32 +02:00
Compare commits
10 Commits
master
...
nalc-1.2.0
Author | SHA1 | Date | |
---|---|---|---|
0f46251d00 | |||
612a94bbf1 | |||
2a88c47de4 | |||
0f00fa8c7e | |||
351a86cbf2 | |||
1b71c304c5 | |||
47f889c178 | |||
6a7053582d | |||
5e877956a5 | |||
60bf32e157 |
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "src/LuaIRC"]
|
[submodule "irc"]
|
||||||
path = irc
|
path = irc
|
||||||
url = https://github.com/ShadowNinja/LuaIRC.git
|
url = https://sys4.fr/gitea/mtcontrib/LuaIRC.git
|
||||||
|
@ -169,10 +169,8 @@ irc.register_bot_command("players", {
|
|||||||
for _, player in pairs(players) do
|
for _, player in pairs(players) do
|
||||||
table.insert(names, player:get_player_name())
|
table.insert(names, player:get_player_name())
|
||||||
end
|
end
|
||||||
return true, string.format("%d connected player(s): %s",
|
return true, "Connected players: "
|
||||||
#players,
|
..table.concat(names, ", ")
|
||||||
table.concat(names, ", ")
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ minetest.register_on_chat_message(function(name, message)
|
|||||||
if nl then
|
if nl then
|
||||||
message = message:sub(1, nl - 1)
|
message = message:sub(1, nl - 1)
|
||||||
end
|
end
|
||||||
irc.say(irc.playerMessage(name, minetest.strip_colors(message)))
|
irc.say(irc.playerMessage(name, core.strip_colors(message)))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function irc.hooks.notice(user, target, message)
|
function irc.hooks.notice(user, target, message)
|
||||||
if user and user.nick and target == irc.config.channel then
|
if user.nick and target == irc.config.channel then
|
||||||
irc.sendLocal("-"..user.nick.."@IRC- "..message)
|
irc.sendLocal("-"..user.nick.."@IRC- "..message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
1
init.lua
1
init.lua
@ -224,3 +224,4 @@ function irc.queue(msg)
|
|||||||
irc.conn:queue(msg)
|
irc.conn:queue(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.log("action", "[irc] loaded.")
|
||||||
|
2
irc
2
irc
Submodule irc updated: e49a52ede1...b8d594e651
@ -47,7 +47,7 @@ minetest.register_chatcommand("who", {
|
|||||||
out[n] = plname
|
out[n] = plname
|
||||||
end
|
end
|
||||||
table.sort(out)
|
table.sort(out)
|
||||||
return true, n.." player(s) in channel: "..table.concat(out, ", ")
|
return true, "Players in channel: "..table.concat(out, ", ")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user