diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-07-27 14:09:42 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-07-27 14:09:42 -0400 |
commit | e1af055dc8bcb2676969b9d57b098e6781df2b01 (patch) | |
tree | bad497845bfa34f3c4b2dce576ce37fa130f0419 | |
parent | d0ec435399ff3308be1b79ad67e37321b9a97b8e (diff) |
[chat] Fix chat bug
-rw-r--r-- | scripts/client.js | 2 | ||||
-rw-r--r-- | scripts/gui/chat.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/client.js b/scripts/client.js index 01d5bea..dba8630 100644 --- a/scripts/client.js +++ b/scripts/client.js @@ -109,6 +109,8 @@ class Client{ case "ready": console.log(`Handshake with server OK. Running client version ${VERSION}`); + this.lobby.setState("Connected", "ok", this.socket.server) + this.settings.cleanup(); this.gameOptions.cleanup(); diff --git a/scripts/gui/chat.js b/scripts/gui/chat.js index 31cc460..8960461 100644 --- a/scripts/gui/chat.js +++ b/scripts/gui/chat.js @@ -46,7 +46,7 @@ class Chat { d.className = "chat-text"; - this.chats[dat.id] = {name: dat.name, e: d, btn: b}; + this.chats[dat.id] = {name: dat.name, id: dat.id, e: d, btn: b}; if(dat.follow) this.switchChannel(dat.id) @@ -91,7 +91,7 @@ class Chat { if(str == "") return; this.chatInput.value = ""; - this.socket.send("chat", {channel: this.getActiveChannel().name, text: str}); + this.socket.send("chat", {channel: this.getActiveChannel().id, text: str}); } recieveMessage (msg) |