Send messages from minetest.chat_send_player() to a user in irc if they are loged in

This commit is contained in:
ShadowNinja 2013-03-26 10:50:49 -04:00
parent 8d5af54830
commit 94ecfb9204

View File

@ -1,5 +1,15 @@
irc_users = {}
local old_chat_send_player = minetest.chat_send_player
minetest.chat_send_player = function(name, message)
for nick, user in pairs(irc_users) do
if name == user then
mt_irc.say(nick, message)
end
end
return old_chat_send_player(name, message)
end
mt_irc.register_bot_command("login", {
params = "<username> <password>",
description = "Login as a user to run commands",