Disconnect on BOUNCER BIND error

This commit is contained in:
Simon Ser 2021-03-10 09:28:25 +01:00
parent 11642e1ab4
commit 5165df718f

View file

@ -235,6 +235,14 @@ export default class Client extends EventTarget {
this.disconnect();
}
break;
case "FAIL":
if (msg.params[0] === "BOUNCER" && msg.params[2] === "BIND") {
this.dispatchEvent(new CustomEvent("error", {
detail: "Failed to bind to bouncer network: " + msg.params[3],
}));
this.disconnect();
}
break;
}
this.dispatchEvent(new CustomEvent("message", {