From 44764cd2b34aaf2cfff20ab357f170d0b5f97710 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Tue, 15 Jan 2013 15:10:28 +0000 Subject: [PATCH] Modified users web to call new stats API [Close #137] --- modules/users/pages.js | 36 ++++++++++++++++-------------------- views/users/users.jade | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/modules/users/pages.js b/modules/users/pages.js index 015d7ba..cbc14f6 100644 --- a/modules/users/pages.js +++ b/modules/users/pages.js @@ -1,4 +1,5 @@ var pages = function(dbot) { + var _ = require('underscore')._; var connections = dbot.instance.connections; return { @@ -26,30 +27,25 @@ var pages = function(dbot) { connections[connection].channels.hasOwnProperty(channel)) { var userData = { "active": [], "inactive": [], "offline": []}; - var channelUsers = dbot.db.knownUsers[connection].channelUsers[channel]; - - var onlineNicks = connections[connection].channels[channel].nicks; - for(var i=0;i