user pages now load again

This commit is contained in:
reality 2013-01-09 06:05:01 +00:00
parent c28047efc1
commit 08f35f90f8
2 changed files with 14 additions and 9 deletions

View File

@ -65,6 +65,7 @@ var pages = function(dbot) {
var quoteCount = dbot.db.quoteArrs[user].length; var quoteCount = dbot.db.quoteArrs[user].length;
} }
if(dbot.config.moduleNames.include('kick')) {
if(!dbot.db.kicks.hasOwnProperty(req.params.user)) { if(!dbot.db.kicks.hasOwnProperty(req.params.user)) {
var kicks = '0'; var kicks = '0';
} else { } else {
@ -76,6 +77,10 @@ var pages = function(dbot) {
} else { } else {
var kicked = dbot.db.kickers[req.params.user]; var kicked = dbot.db.kickers[req.params.user];
} }
} else {
var kicks = 'N/A';
var kicked = 'N/A';
}
res.render('user', { 'name': dbot.config.name, 'user': req.params.user, res.render('user', { 'name': dbot.config.name, 'user': req.params.user,
'channel': channel, 'connection': connection, 'cleanUser': user, 'channel': channel, 'connection': connection, 'cleanUser': user,

View File

@ -7,7 +7,7 @@ block content
ul#quotelist ul#quotelist
-each nick in nicks -each nick in nicks
if nicks.hasOwnProperty(nick.name) if nicks.hasOwnProperty(nick.name)
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick) a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick.name)
if nick.online if nick.online
if nick.active if nick.active
li.quotes #{nick.name} (Online, Active) li.quotes #{nick.name} (Online, Active)