1
0
mirror of https://github.com/minetest-mods/irc.git synced 2024-11-05 01:30:19 +01:00

Fix kicking, the server would quit whenever anyone was kicked.

Also don't rejoin when kicked.
This commit is contained in:
ShadowNinja 2013-04-19 23:52:03 -04:00
parent 409dbf9262
commit eefef12688

View File

@ -121,12 +121,13 @@ irc.register_callback("private_msg", function ( from, message )
minetest.chat_send_player(player_to, "PRIVATE: "..text);
end);
irc.register_callback("kick", function ( chaninfo, to, from )
minetest.chat_send_all("IRC: Bot was kicked by "..from..". Reconnecting bot in 5 seconds...");
mt_irc.got_motd = false;
mt_irc.connect_ok = false;
irc.quit("Kicked");
minetest.after(5, mt_irc.connect);
irc.register_callback("kick", function(chaninfo, nick, kicker)
if nick == mt_irc.server_nick then
minetest.chat_send_all("IRC: Bot was kicked by "..kicker..".");
mt_irc.got_motd = false;
mt_irc.connect_ok = false;
irc.quit("Kicked");
end
end);
irc.register_callback("nick_change", function ( from, old_nick )