Trigger client error if server doesn't support SASL

This commit is contained in:
Simon Ser 2021-03-09 09:44:48 +01:00
parent 56e705b6de
commit 5fea13df0a

View File

@ -149,7 +149,7 @@ export default class Client extends EventTarget {
switch (msg.command) {
case irc.RPL_WELCOME:
if (this.params.saslPlain && this.availableCaps["sasl"] === undefined) {
console.error("Server doesn't support SASL PLAIN");
this.dispatchEvent(new CustomEvent("error", { detail: "Server doesn't support SASL PLAIN" }));
this.disconnect();
return;
}