From e8ee1853720131c03d5a522cf8f736d8871a85f3 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Tue, 25 Aug 2015 23:23:44 +0200 Subject: [PATCH] prevent players to connect 2 times with the same account --- app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.js b/app.js index f286705..6fa5a91 100644 --- a/app.js +++ b/app.js @@ -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);