Compare commits

...

5 Commits

Author SHA1 Message Date
Miniontoby 758e9b6361
Fix error caused by ident check notice (#71)
Fixed the error where it cannot find an user at the notice hook. 
It happened when you get the `NOTICE * :*** Looking up your hostname and checking ident`
Because `*` is not in the `<nick>!<ident>@<host>`
2022-03-23 22:13:51 +01:00
SmallJoker 7fbbfd6cdb Fix failing luacheck 2020-07-18 18:00:38 +02:00
Andrey Kozlovskiy cc78f12a4c
Display total number of players with /who (#65) 2020-07-18 17:57:42 +02:00
David Leal ceb40e2bb3
Add luacheck GitHub integration (#62) 2020-02-19 18:46:29 +01:00
Wade Cline 5e3659761b Add extra library search path (#60) 2019-10-17 21:29:02 +02:00
7 changed files with 18 additions and 5 deletions

11
.github/workflows/check-release.yml vendored Normal file
View File

@ -0,0 +1,11 @@
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

View File

@ -2,7 +2,7 @@
allow_defined_top = true
read_globals = {
"minetest",
"minetest"
}
exclude_files = {

View File

@ -1,3 +1,4 @@
[![](https://github.com/minetest-mods/irc/workflows/Check%20&%20Release/badge.svg)](https://github.com/minetest-mods/irc/actions)
IRC Mod for Minetest
====================

View File

@ -31,7 +31,7 @@ minetest.register_on_chat_message(function(name, message)
if nl then
message = message:sub(1, nl - 1)
end
irc.say(irc.playerMessage(name, core.strip_colors(message)))
irc.say(irc.playerMessage(name, minetest.strip_colors(message)))
end)

View File

@ -171,7 +171,7 @@ end
function irc.hooks.notice(user, target, message)
if user.nick and target == irc.config.channel then
if user and user.nick and target == irc.config.channel then
irc.sendLocal("-"..user.nick.."@IRC- "..message)
end
end

View File

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

View File

@ -47,7 +47,7 @@ minetest.register_chatcommand("who", {
out[n] = plname
end
table.sort(out)
return true, "Players in channel: "..table.concat(out, ", ")
return true, n.." player(s) in channel: "..table.concat(out, ", ")
end
})