change scoring and sorting
This commit is contained in:
parent
5414c719f1
commit
155257514d
4 changed files with 16 additions and 6 deletions
5
index.js
5
index.js
|
@ -62,7 +62,12 @@ app.ws('/', function (ws, req) {
|
|||
}
|
||||
);
|
||||
j = await j.json();
|
||||
if (game.ws.findIndex(x => x.username == j.username) != -1) {
|
||||
console.log(`Player ${player.you} uses username ${ws.username} illegally`)
|
||||
return;
|
||||
}
|
||||
ws.username = j.username;
|
||||
|
||||
console.log(`Player ${player.you} uses username ${ws.username}`)
|
||||
})()
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue