Changes for irc-framework update
This commit is contained in:
parent
761d482572
commit
4becb152bb
@ -173,8 +173,10 @@ Network.prototype.createIrcFramework = function (client) {
|
|||||||
enable_echomessage: true,
|
enable_echomessage: true,
|
||||||
enable_setname: true,
|
enable_setname: 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_max_retries: 360, // At least one hour (plus timeouts) worth of reconnections
|
// Exponential backoff maxes out at 300 seconds after 9 reconnects,
|
||||||
|
// it will keep trying for well over an hour (plus the timeouts)
|
||||||
|
auto_reconnect_max_retries: 30,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setIrcFrameworkOptions(client);
|
this.setIrcFrameworkOptions(client);
|
||||||
|
@ -178,14 +178,9 @@ module.exports = function (irc, network) {
|
|||||||
network.channels[0].pushMessage(
|
network.channels[0].pushMessage(
|
||||||
client,
|
client,
|
||||||
new Msg({
|
new Msg({
|
||||||
text:
|
text: `Disconnected from the network. Reconnecting in ${Math.round(
|
||||||
"Disconnected from the network. Reconnecting in " +
|
data.wait / 1000
|
||||||
Math.round(data.wait / 1000) +
|
)} seconds… (Attempt ${data.attempt})`,
|
||||||
" seconds… (Attempt " +
|
|
||||||
data.attempt +
|
|
||||||
" of " +
|
|
||||||
data.max_retries +
|
|
||||||
")",
|
|
||||||
}),
|
}),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -8,7 +8,7 @@ const pkg = require("../../../package.json");
|
|||||||
|
|
||||||
const ctcpResponses = {
|
const ctcpResponses = {
|
||||||
CLIENTINFO: () =>
|
CLIENTINFO: () =>
|
||||||
Object.getOwnPropertyNames(ctcpResponses) // TODO: This is currently handled by irc-framework
|
Object.getOwnPropertyNames(ctcpResponses)
|
||||||
.filter((key) => key !== "CLIENTINFO" && typeof ctcpResponses[key] === "function")
|
.filter((key) => key !== "CLIENTINFO" && typeof ctcpResponses[key] === "function")
|
||||||
.join(" "),
|
.join(" "),
|
||||||
PING: ({message}) => message.substring(5),
|
PING: ({message}) => message.substring(5),
|
||||||
|
Loading…
Reference in New Issue
Block a user