Remove usage of == and !=

This commit is contained in:
Simon Ser 2024-10-14 00:56:18 +02:00
parent 205a617c51
commit b67cd10c64
21 changed files with 79 additions and 78 deletions

View file

@ -354,7 +354,7 @@ export default class Client extends EventTarget {
case "AUTHENTICATE":
// Both PLAIN and EXTERNAL expect an empty challenge
let challengeStr = msg.params[0];
if (challengeStr != "+") {
if (challengeStr !== "+") {
this.dispatchError(new Error("Expected an empty challenge, got: " + challengeStr));
this.send({ command: "AUTHENTICATE", params: ["*"] });
}
@ -425,7 +425,7 @@ export default class Client extends EventTarget {
case irc.ERR_NOPERMFORHOST:
case irc.ERR_YOUREBANNEDCREEP:
this.dispatchError(new IRCError(msg));
if (this.status != Client.Status.REGISTERED) {
if (this.status !== Client.Status.REGISTERED) {
this.disconnect();
}
break;
@ -656,7 +656,7 @@ export default class Client extends EventTarget {
switch (subCmd) {
case "LS":
this.supportsCap = true;
if (args[0] == "*") {
if (args[0] === "*") {
break;
}
@ -728,7 +728,7 @@ export default class Client extends EventTarget {
}
isMyNick(nick) {
return this.cm(nick) == this.cm(this.nick);
return this.cm(nick) === this.cm(this.nick);
}
isChannel(name) {
@ -775,7 +775,7 @@ export default class Client extends EventTarget {
let msg = event.detail.message;
let msgLabel = irc.getMessageLabel(msg);
if (msgLabel && msgLabel != label) {
if (msgLabel && msgLabel !== label) {
return;
}