From c28047efc191c1bcd0808aa3a1a2b6585b3c1c64 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 9 Jan 2013 05:53:45 +0000 Subject: [PATCH] Activity indicator [#111] --- modules/users/users.js | 1 - modules/users/web.js | 30 ++++++++++++++++++++---------- views/users/users.jade | 5 ++++- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/modules/users/users.js b/modules/users/users.js index d08c91f..6037f2a 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -38,7 +38,6 @@ var users = function(dbot) { var knownUsers = getServerUsers(event.server); if(!knownUsers.channelUsers.hasOwnProperty(event.channel.name)) { knownUsers.channelUsers[event.channel.name] = []; - event.reply('creating new chanusers') } var channelUsers = knownUsers.channelUsers[event.channel.name]; diff --git a/modules/users/web.js b/modules/users/web.js index ff7754b..6c4f516 100644 --- a/modules/users/web.js +++ b/modules/users/web.js @@ -1,4 +1,6 @@ var pages = function(dbot) { + var connections = dbot.instance.connections; + return { '/connections': function(req, res) { var connections = Object.keys(dbot.instance.connections); @@ -23,23 +25,31 @@ var pages = function(dbot) { if(connections.hasOwnProperty(connection) && connections[connection].channels.hasOwnProperty(channel)) { - var nicks = dbot.db.knownUsers[connection].channelUsers[channel]; - var channelUsers = {}; - for(var i=0;i