Unprefix setname cap

This commit is contained in:
Pavel Djundik 2020-02-18 14:07:03 +02:00
parent 44de1dd03f
commit 3ca9fd2e80

View File

@ -141,6 +141,7 @@ Network.prototype.createIrcFramework = function(client) {
rejectUnauthorized: this.rejectUnauthorized, rejectUnauthorized: this.rejectUnauthorized,
enable_chghost: true, enable_chghost: true,
enable_echomessage: true, enable_echomessage: 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_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
@ -148,7 +149,6 @@ Network.prototype.createIrcFramework = function(client) {
}); });
this.irc.requestCap([ this.irc.requestCap([
"draft/setname", // https://github.com/ircv3/ircv3-specifications/pull/361
"znc.in/self-message", // Legacy echo-message for ZNC "znc.in/self-message", // Legacy echo-message for ZNC
]); ]);
@ -238,7 +238,7 @@ Network.prototype.edit = function(client, args) {
if ( if (
connected && connected &&
this.realname !== oldRealname && this.realname !== oldRealname &&
this.irc.network.cap.isEnabled("draft/setname") this.irc.network.cap.isEnabled("setname")
) { ) {
this.irc.raw("SETNAME", this.realname); this.irc.raw("SETNAME", this.realname);
} }