diff --git a/src/client.js b/src/client.js index 4ad1bf93..194c09f9 100644 --- a/src/client.js +++ b/src/client.js @@ -211,7 +211,7 @@ Client.prototype.connect = function(args) { tls: network.tls, localAddress: config.bind, rejectUnauthorized: false, - auto_reconnect: false, // TODO: Enable auto reconnection + auto_reconnect: true, webirc: webirc, }); diff --git a/src/plugins/irc-events/connection.js b/src/plugins/irc-events/connection.js index 26676297..597e1db3 100644 --- a/src/plugins/irc-events/connection.js +++ b/src/plugins/irc-events/connection.js @@ -19,9 +19,9 @@ module.exports = function(irc, network) { })); }); - irc.on("socket close", function() { + irc.on("close", function() { network.channels[0].pushMessage(client, new Msg({ - text: "Disconnected from the network." + text: "Disconnected from the network, and will not reconnect." })); }); @@ -35,7 +35,7 @@ module.exports = function(irc, network) { irc.on("reconnecting", function() { network.channels[0].pushMessage(client, new Msg({ - text: "Reconnecting..." + text: "Disconnected from the network. Reconnecting..." })); });