mirror of
https://github.com/minetest-mods/irc_commands.git
synced 2025-01-09 23:30:19 +01:00
Add support for sending output from commands to IRC
This commit is contained in:
parent
8d5af54830
commit
3d637685a0
5
init.lua
5
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})
|
||||
|
Loading…
Reference in New Issue
Block a user