1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-01-12 11:00:25 +01:00

Added IRC as optional dependency of fail

- Failing and baking cookies now send the chat messages through IRC if available
This commit is contained in:
LeMagnesium 2015-06-29 20:32:43 +02:00
parent 31e32f7dde
commit 5a87525357
2 changed files with 7 additions and 2 deletions

1
mods/fail/depends.txt Executable file
View File

@ -0,0 +1 @@
irc?

View File

@ -42,13 +42,17 @@ end
data.send_func = function(name, msg) minetest.chat_send_player(name, msg) end
if data.PUB_MSG then
data.send_func = function (name, msg) minetest.chat_send_all(msg) end
data.send_func = function (name, msg)
if irc then
irc:say(msg)
end
minetest.chat_send_all(msg)
end
end
data.is_player_available = minetest.get_player_by_name
if data.STRICT_PLAYER_CHECK == false then
data.is_player_available = function (name)
return (io.open(minetest.get_worldpath().."/players/"..name) ~= nil)
end