forked from CringeStudios/gamja
Handle RPL_WELCOME
This commit is contained in:
parent
8b35d40702
commit
a8e876843b
@ -181,9 +181,6 @@ function connect() {
|
||||
ws.onopen = function() {
|
||||
console.log("Connection opened");
|
||||
|
||||
// TODO: wait for RPL_WELCOME
|
||||
connectElt.style.display = "none";
|
||||
|
||||
if (server.pass) {
|
||||
ws.send(formatMessage({ command: "PASS", params: [server.pass] }));
|
||||
}
|
||||
@ -199,6 +196,10 @@ function connect() {
|
||||
console.log(msg);
|
||||
|
||||
switch (msg.command) {
|
||||
case RPL_WELCOME:
|
||||
console.log("Registration complete");
|
||||
connectElt.style.display = "none";
|
||||
break;
|
||||
case "NOTICE":
|
||||
case "PRIVMSG":
|
||||
var target = msg.params[0];
|
||||
|
@ -1,3 +1,5 @@
|
||||
const RPL_WELCOME = "001";
|
||||
|
||||
function parsePrefix(s) {
|
||||
var prefix = {
|
||||
name: null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user