From e2abbff7b0f94bcddba519c1234473a7a86b691c Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 2 Feb 2017 20:52:37 +0000 Subject: [PATCH] fix(package): update irc-framework to version 2.5.5 https://greenkeeper.io/ --- package.json | 2 +- src/client.js | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index d1f3d1ef..5b225b68 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "event-stream": "3.3.4", "express": "4.14.0", "fs-extra": "1.0.0", - "irc-framework": "2.5.3", + "irc-framework": "2.5.5", "ldapjs": "1.0.1", "lodash": "4.17.4", "moment": "2.17.1", diff --git a/src/client.js b/src/client.js index ceee4088..111e353d 100644 --- a/src/client.js +++ b/src/client.js @@ -246,22 +246,7 @@ Client.prototype.connect = function(args) { } } - network.irc = new ircFramework.Client(); - - network.irc.requestCap([ - "echo-message", - "znc.in/self-message", - ]); - - events.forEach(plugin => { - var path = "./plugins/irc-events/" + plugin; - require(path).apply(client, [ - network.irc, - network - ]); - }); - - network.irc.connect({ + network.irc = new ircFramework.Client({ version: pkg.name + " " + Helper.getVersion() + " -- " + pkg.homepage, host: network.host, port: network.port, @@ -272,12 +257,27 @@ Client.prototype.connect = function(args) { tls: network.tls, localAddress: config.bind, rejectUnauthorized: false, + enable_echomessage: true, auto_reconnect: true, auto_reconnect_wait: 10000 + Math.floor(Math.random() * 1000), // If multiple users are connected to the same network, randomize their reconnections a little auto_reconnect_max_retries: 360, // At least one hour (plus timeouts) worth of reconnections webirc: webirc, }); + network.irc.requestCap([ + "znc.in/self-message", // Legacy echo-message for ZNc + ]); + + events.forEach(plugin => { + var path = "./plugins/irc-events/" + plugin; + require(path).apply(client, [ + network.irc, + network + ]); + }); + + network.irc.connect(); + client.save(); };