diff --git a/lib/client.js b/lib/client.js index bc1f457..3ed2e6b 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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; }