Allow cloaked players to receive IRC messages
Override irc.sendLocal() to send messages to cloaked players.
This commit is contained in:
parent
b3f6c84415
commit
ad11b33cee
4
init.lua
4
init.lua
|
@ -10,3 +10,7 @@ dofile(path .. '/chatcommands.lua')
|
|||
if chat3 then
|
||||
dofile(path .. '/chat3.lua')
|
||||
end
|
||||
|
||||
if irc then
|
||||
dofile(path .. '/irc.lua')
|
||||
end
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue