From 3d637685a0b71467792264092e23a281eff3f056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Mart=C3=ADnez?= Date: Tue, 26 Mar 2013 11:53:30 -0300 Subject: [PATCH] Add support for sending output from commands to IRC --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index 659342b..220cf9c 100644 --- a/init.lua +++ b/init.lua @@ -50,7 +50,12 @@ mt_irc.register_bot_command("command", { return end if minetest.check_player_privs(irc_users[from], command.privs) then + local send = minetest.chat_send_player + minetest.chat_send_player = function(name, message) + mt_irc.say(name, message) + end command.func(irc_users[from], (params or "")) + minetest.chat_send_player = send mt_irc.say(from, "Command run successfuly") end end})