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_setname: 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);
|
||||
|
@ -178,14 +178,9 @@ module.exports = function (irc, network) {
|
||||
network.channels[0].pushMessage(
|
||||
client,
|
||||
new Msg({
|
||||
text:
|
||||
"Disconnected from the network. Reconnecting in " +
|
||||
Math.round(data.wait / 1000) +
|
||||
" seconds… (Attempt " +
|
||||
data.attempt +
|
||||
" of " +
|
||||
data.max_retries +
|
||||
")",
|
||||
text: `Disconnected from the network. Reconnecting in ${Math.round(
|
||||
data.wait / 1000
|
||||
)} seconds… (Attempt ${data.attempt})`,
|
||||
}),
|
||||
true
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ const pkg = require("../../../package.json");
|
||||
|
||||
const ctcpResponses = {
|
||||
CLIENTINFO: () =>
|
||||
Object.getOwnPropertyNames(ctcpResponses) // TODO: This is currently handled by irc-framework
|
||||
Object.getOwnPropertyNames(ctcpResponses)
|
||||
.filter((key) => key !== "CLIENTINFO" && typeof ctcpResponses[key] === "function")
|
||||
.join(" "),
|
||||
PING: ({message}) => message.substring(5),
|
||||
|
Loading…
Reference in New Issue
Block a user