mirror of
https://github.com/minetest-mods/irc.git
synced 2025-07-17 07:10:23 +02:00
Compare commits
9 Commits
master
...
612a94bbf1
Author | SHA1 | Date | |
---|---|---|---|
612a94bbf1 | |||
2a88c47de4 | |||
0f00fa8c7e | |||
351a86cbf2 | |||
1b71c304c5 | |||
47f889c178 | |||
6a7053582d | |||
5e877956a5 | |||
60bf32e157 |
11
.github/workflows/check-release.yml
vendored
11
.github/workflows/check-release.yml
vendored
@ -1,11 +0,0 @@
|
|||||||
on: [push, pull_request]
|
|
||||||
name: Check & Release
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: lint
|
|
||||||
uses: Roang-zero1/factorio-mod-luacheck@master
|
|
||||||
with:
|
|
||||||
luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/irc/master/.luacheckrc
|
|
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
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
allow_defined_top = true
|
allow_defined_top = true
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"minetest"
|
"minetest",
|
||||||
}
|
}
|
||||||
|
|
||||||
exclude_files = {
|
exclude_files = {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
[](https://github.com/minetest-mods/irc/actions)
|
|
||||||
|
|
||||||
IRC Mod for Minetest
|
IRC Mod for Minetest
|
||||||
====================
|
====================
|
||||||
|
@ -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