mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-24 09:11:43 +00:00
prevent players to connect 2 times with the same account
This commit is contained in:
parent
426baef148
commit
e8ee185372
1 changed files with 5 additions and 0 deletions
5
app.js
5
app.js
|
|
@ -39,6 +39,11 @@ function transformUuid(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
server.on('login', function(client) {
|
server.on('login', function(client) {
|
||||||
|
if(uuidToPlayer[client.uuid])
|
||||||
|
{
|
||||||
|
client.end("You are already connected");
|
||||||
|
return;
|
||||||
|
}
|
||||||
entityMaxId++;
|
entityMaxId++;
|
||||||
client.id=entityMaxId;
|
client.id=entityMaxId;
|
||||||
playersConnected.push(client);
|
playersConnected.push(client);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue