Skip to content

Commit

Permalink
send messages to player on irc if they are on irc
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Mar 14, 2020
1 parent 4f4547a commit 416c2d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ local worldpath = minetest.get_worldpath()
local function chat_send_player(name, message, ...)
message = message:format(...)
minetest.chat_send_player(name, message)
local irc_message = minetest.strip_colors(message)
if minetest.global_exists('irc') and irc.joined_players[name] then
irc.say(name, irc_message)
end
if minetest.global_exists('irc2') and irc2.joined_players[name] then
irc2.say(name, irc_message)
end
end

local function register_chatcommand(name, def)
Expand Down

0 comments on commit 416c2d3

Please sign in to comment.