Merge pull request #902 from thelounge/greenkeeper/irc-framework-2.5.4

Update irc-framework to the latest version 🚀
This commit is contained in:
Jérémie Astori 2017-02-12 00:43:15 -05:00 committed by GitHub
commit b30450141e
2 changed files with 17 additions and 17 deletions

View File

@ -47,7 +47,7 @@
"event-stream": "3.3.4", "event-stream": "3.3.4",
"express": "4.14.0", "express": "4.14.0",
"fs-extra": "1.0.0", "fs-extra": "1.0.0",
"irc-framework": "2.5.3", "irc-framework": "2.5.5",
"ldapjs": "1.0.1", "ldapjs": "1.0.1",
"lodash": "4.17.4", "lodash": "4.17.4",
"moment": "2.17.1", "moment": "2.17.1",

View File

@ -246,22 +246,7 @@ Client.prototype.connect = function(args) {
} }
} }
network.irc = new ircFramework.Client(); 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({
version: pkg.name + " " + Helper.getVersion() + " -- " + pkg.homepage, version: pkg.name + " " + Helper.getVersion() + " -- " + pkg.homepage,
host: network.host, host: network.host,
port: network.port, port: network.port,
@ -272,12 +257,27 @@ Client.prototype.connect = function(args) {
tls: network.tls, tls: network.tls,
localAddress: config.bind, localAddress: config.bind,
rejectUnauthorized: false, rejectUnauthorized: false,
enable_echomessage: true,
auto_reconnect: 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_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 auto_reconnect_max_retries: 360, // At least one hour (plus timeouts) worth of reconnections
webirc: webirc, 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(); client.save();
}; };