This commit is contained in:
Diego Martínez 2012-12-02 07:00:41 -02:00
parent a26afbc771
commit 1f242935c5

View File

@ -25,7 +25,7 @@ local CHANNEL = "#minetest-irc-testing";
local DTIME = 0.5; local DTIME = 0.5;
-- Enable debug output (boolean, default false) -- Enable debug output (boolean, default false)
local DEBUG = false; local DEBUG = true;
local SERVER_NICK = "mt_game"; local SERVER_NICK = "mt_game";
@ -91,6 +91,9 @@ minetest.register_on_joinplayer(function ( player )
irc.register_callback("private_msg", function ( from, message ) irc.register_callback("private_msg", function ( from, message )
end); end);
irc.register_callback("action", function ( from, message )
end);
irc.register_callback("nick_change", function ( from, old_nick ) irc.register_callback("nick_change", function ( from, old_nick )
end); end);
@ -101,6 +104,8 @@ minetest.register_on_leaveplayer(function ( player )
end); end);
minetest.register_on_chat_message(function ( name, message ) minetest.register_on_chat_message(function ( name, message )
print("***DEBUG: CHAT: "..name.."|"..message);
irc.say(CHANNEL, "*** "..player:get_player_name().." joined the game");
if (not mt_irc.buffered_messages) then if (not mt_irc.buffered_messages) then
mt_irc.buffered_messages = { }; mt_irc.buffered_messages = { };
end end
@ -113,6 +118,6 @@ end);
irc.connect({ irc.connect({
network = SERVER; network = SERVER;
nick = SERVER_NICK; nick = SERVER_NICK;
pass = "1234"; pass = "";
timeout = 1.0; timeout = 1.0;
}); });