diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-22 00:23:43 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-23 02:10:40 +0100 |
commit | 6aa382f07a75872db327f5f1ed1c012da0d3d5e3 (patch) | |
tree | 16a63bf27685fbdd9957e3bd28028966b5836899 /public | |
parent | 924101c4c0ed18f5bae2ee83de368a4f1f0bee51 (diff) | |
download | server-6aa382f07a75872db327f5f1ed1c012da0d3d5e3.tar.gz |
Send system chat messages when players join and part active games.
Diffstat (limited to 'public')
-rw-r--r-- | public/common/client.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/public/common/client.js b/public/common/client.js index 23e434d..87dc698 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -231,7 +231,10 @@ function update_chat(chat_id, raw_date, user, message) { } function add_chat_line(time, user, message) { let line = document.createElement("div") - line.textContent = "[" + time + "] " + user + " \xbb " + message + if (user) + line.textContent = "[" + time + "] " + user + " \xbb " + message + else + line.textContent = "[" + time + "] " + message chat.text_element.appendChild(line) chat.text_element.scrollTop = chat.text_element.scrollHeight } |