prevent players to connect 2 times with the same account

This commit is contained in:
Romain Beaumont 2015-08-25 23:23:44 +02:00
parent 426baef148
commit e8ee185372

5
app.js
View file

@ -39,6 +39,11 @@ function transformUuid(s)
}
server.on('login', function(client) {
if(uuidToPlayer[client.uuid])
{
client.end("You are already connected");
return;
}
entityMaxId++;
client.id=entityMaxId;
playersConnected.push(client);