diff --git a/.gitignore b/.gitignore index 0efe000..f9177ce 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ node_modules # Users Environment Variables .lock-wscript docs/Thumbs.db + +# Vim temp files +*.swp diff --git a/package.json b/package.json index a9d4c13..4d4a036 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "cryptalk", - "version" : "1.1.15", + "version" : "1.1.16", "description" : "Encrypted HTML5/Node.JS instant chat", "main" : "server.js", "subdomain": "cryptalk", diff --git a/server.js b/server.js index 91215a1..ce6efa9 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ io.on('connection', function(socket) { socket.on('room:count', function (req) { if( socket.current_room !== undefined ) { var clientsList = io.sockets.adapter.rooms[socket.current_room]; - socket.emit('message:server', {msg:'person_count', payload: Object.keys(clientsList).length } ); + socket.emit('message:server', {msg:'person_count', payload: clientsList.length } ); } else { socket.emit('message:server', {msg:'command_failed'} ); }