From 0ebe49f0b1df5866c7adc9a2330d46c870db0412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Mart=C3=ADnez?= Date: Tue, 8 Jan 2013 22:45:55 -0200 Subject: [PATCH] Added message when a user changes nickname --- src/callback.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/callback.lua b/src/callback.lua index b4c53fd..fe41f93 100644 --- a/src/callback.lua +++ b/src/callback.lua @@ -103,9 +103,14 @@ end); irc.register_callback("nick_change", function ( from, old_nick ) if (not mt_irc.connect_ok) then return; end + local text = "["..old_nick.." changed his nick to "..from.."]"; + for k, v in pairs(mt_irc.connected_players) do + if (v) then minetest.chat_send_player(k, text); end + end end); irc.register_callback("channel_act", function ( servinfo, from, message) + if (not mt_irc.connect_ok) then return; end local text = "*** "..from.." "..message; for k, v in pairs(mt_irc.connected_players) do if (v) then minetest.chat_send_player(k, text); end