Allow cloaked players to receive IRC messages

Override irc.sendLocal() to send messages to cloaked players.
This commit is contained in:
luk3yx 2018-04-14 09:54:35 +12:00
parent b3f6c84415
commit ad11b33cee
2 changed files with 18 additions and 0 deletions

View File

@ -10,3 +10,7 @@ dofile(path .. '/chatcommands.lua')
if chat3 then
dofile(path .. '/chat3.lua')
end
if irc then
dofile(path .. '/irc.lua')
end

14
irc.lua Normal file
View File

@ -0,0 +1,14 @@
--
-- Minetest cloaking mod: IRC fixes
--
-- © 2018 by luk3yx
--
local irc_sendLocal = irc.sendLocal
irc.sendLocal = function(msg)
for _, player in ipairs(cloaking.get_cloaked_players()) do
minetest.chat_send_player(player, msg)
end
return irc_sendLocal(msg)
end