mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Handle RPL_WELCOME
This commit is contained in:
parent
8b35d40702
commit
a8e876843b
2 changed files with 6 additions and 3 deletions
|
@ -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…
Reference in a new issue