code/static: bugfix: only send new user join message after initial userlist packet from server

master
ALI Hamza 2019-09-26 08:11:28 +07:00
parent 25d57c6844
commit 1e972b6935
No known key found for this signature in database
GPG Key ID: BCA8A46C87798C4C
1 changed files with 1 additions and 1 deletions

@ -56,6 +56,7 @@ function newMessage(data) {
switch(data.type) {
case "join":
userJoin(data.content, data.date);
serverMessage(data.content + " has joined the server", data.date);
break;
case "leave":
userLeave(data.content, data.date);
@ -116,7 +117,6 @@ function userJoin(user, date) {
p.className = user;
p.innerText = user;
document.getElementById("users").appendChild(p);
serverMessage(user + " has joined the server", date);
}
function userLeave(user, date) {