forked from minetest-mods/irc
Compare commits
2 Commits
351a86cbf2
...
nalc-1.0
Author | SHA1 | Date | |
---|---|---|---|
0f00fa8c7e | |||
1b71c304c5 |
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "irc"]
|
[submodule "irc"]
|
||||||
path = irc
|
path = irc
|
||||||
url = https://sys4.fr/gitea/Minetest/LuaIRC.git
|
url = https://sys4.fr/gitea/mtcontrib/LuaIRC.git
|
||||||
|
6
init.lua
6
init.lua
@ -23,17 +23,11 @@ ie.package.path =
|
|||||||
-- /usr/local/share and /usr/local/lib but LuaSocket is often installed under
|
-- /usr/local/share and /usr/local/lib but LuaSocket is often installed under
|
||||||
-- /usr/share and /usr/lib.
|
-- /usr/share and /usr/lib.
|
||||||
if not rawget(_G, "jit") and package.config:sub(1, 1) == "/" then
|
if not rawget(_G, "jit") and package.config:sub(1, 1) == "/" then
|
||||||
|
|
||||||
ie.package.path = ie.package.path..
|
ie.package.path = ie.package.path..
|
||||||
";/usr/share/lua/5.1/?.lua"..
|
";/usr/share/lua/5.1/?.lua"..
|
||||||
";/usr/share/lua/5.1/?/init.lua"
|
";/usr/share/lua/5.1/?/init.lua"
|
||||||
|
|
||||||
ie.package.cpath = ie.package.cpath..
|
ie.package.cpath = ie.package.cpath..
|
||||||
";/usr/lib/lua/5.1/?.so"
|
";/usr/lib/lua/5.1/?.so"
|
||||||
|
|
||||||
ie.package.cpath = "/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;"..ie.package.cpath
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Temporarily set require so that LuaIRC can access it
|
-- Temporarily set require so that LuaIRC can access it
|
||||||
|
@ -13,8 +13,6 @@ end
|
|||||||
function irc.player_join(name)
|
function irc.player_join(name)
|
||||||
if irc.joined_players[name] then
|
if irc.joined_players[name] then
|
||||||
return false, "You are already in the channel"
|
return false, "You are already in the channel"
|
||||||
elseif not minetest.get_player_by_name(name) then
|
|
||||||
return false, "You need to be in-game to join the channel"
|
|
||||||
end
|
end
|
||||||
irc.joined_players[name] = true
|
irc.joined_players[name] = true
|
||||||
return true, "You joined the channel"
|
return true, "You joined the channel"
|
||||||
|
Reference in New Issue
Block a user