mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Handle ERR_PASSWDMISMATCH
This commit is contained in:
parent
a08fdeea8f
commit
cb04f42fe7
2 changed files with 9 additions and 0 deletions
|
@ -200,6 +200,10 @@ function connect() {
|
|||
console.log("Registration complete");
|
||||
connectElt.style.display = "none";
|
||||
break;
|
||||
case ERR_PASSWDMISMATCH:
|
||||
console.error("Password mismatch");
|
||||
disconnect();
|
||||
break;
|
||||
case "NOTICE":
|
||||
case "PRIVMSG":
|
||||
var target = msg.params[0];
|
||||
|
@ -252,6 +256,10 @@ function connect() {
|
|||
switchBuffer(serverBuffer);
|
||||
}
|
||||
|
||||
function disconnect() {
|
||||
ws.close(1000);
|
||||
}
|
||||
|
||||
function sendMessage(msg) {
|
||||
ws.send(formatMessage(msg));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const RPL_WELCOME = "001";
|
||||
const ERR_PASSWDMISMATCH = "464";
|
||||
|
||||
function parsePrefix(s) {
|
||||
var prefix = {
|
||||
|
|
Loading…
Reference in a new issue