From 126f3182fda6100fc2215c5c7e53667467ac7a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 28 Nov 2014 14:30:43 -0500 Subject: [PATCH 1/3] fix next --- src/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user.js b/src/user.js index efdcb618fe..72694e8bfe 100644 --- a/src/user.js +++ b/src/user.js @@ -191,9 +191,9 @@ var async = require('async'), if (set === 'users:online') { var count = parseInt(stop, 10) === -1 ? stop : stop - start + 1; var now = Date.now(); - db.getSortedSetRevRangeByScore(set, start, count, now, now - 300000, next); + db.getSortedSetRevRangeByScore(set, start, count, now, now - 300000, callback); } else { - db.getSortedSetRevRange(set, start, stop, next); + db.getSortedSetRevRange(set, start, stop, callback); } }; From 4d4f39a44fd6f1eaf0b1b2530affce9020ebdf86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 28 Nov 2014 14:34:21 -0500 Subject: [PATCH 2/3] added missing db --- src/socket.io/meta.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/socket.io/meta.js b/src/socket.io/meta.js index 65a4038d2e..037ba41bd1 100644 --- a/src/socket.io/meta.js +++ b/src/socket.io/meta.js @@ -4,7 +4,8 @@ var nconf = require('nconf'), gravatar = require('gravatar'), winston = require('winston'), validator = require('validator'), - + + db = require('../database'), meta = require('../meta'), user = require('../user'), topics = require('../topics'), From b8845181f67a6febe2d12c28aef6093bb4cd5318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 28 Nov 2014 14:34:51 -0500 Subject: [PATCH 3/3] missing now :( --- src/socket.io/meta.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/socket.io/meta.js b/src/socket.io/meta.js index 037ba41bd1..3ee197a868 100644 --- a/src/socket.io/meta.js +++ b/src/socket.io/meta.js @@ -87,6 +87,7 @@ SocketMeta.rooms.enter = function(socket, data, callback) { }; SocketMeta.rooms.getAll = function(socket, data, callback) { + var now = Date.now(); db.sortedSetCount('users:online', now - 300000, now, function(err, onlineRegisteredCount) { if (err) { return callback(err);