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,16 +65,21 @@ var pages = function(dbot) {
var quoteCount = dbot.db.quoteArrs[user].length; var quoteCount = dbot.db.quoteArrs[user].length;
} }
if(!dbot.db.kicks.hasOwnProperty(req.params.user)) { if(dbot.config.moduleNames.include('kick')) {
var kicks = '0'; if(!dbot.db.kicks.hasOwnProperty(req.params.user)) {
} else { var kicks = '0';
var kicks = dbot.db.kicks[req.params.user]; } else {
} var kicks = dbot.db.kicks[req.params.user];
}
if(!dbot.db.kickers.hasOwnProperty(req.params.user)) { if(!dbot.db.kickers.hasOwnProperty(req.params.user)) {
var kicked = '0'; var kicked = '0';
} else {
var kicked = dbot.db.kickers[req.params.user];
}
} else { } else {
var kicked = dbot.db.kickers[req.params.user]; 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,

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)