From e3a1bf2f8781860dc7317e43228f3e6080ec87f4 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 13 Apr 2016 10:10:44 +0300 Subject: [PATCH] Enable auto reconnection --- src/client.js | 2 +- src/plugins/irc-events/connection.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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..." })); });