diff --git a/modules/users/web.js b/modules/users/web.js index 6c4f516..48a8996 100644 --- a/modules/users/web.js +++ b/modules/users/web.js @@ -65,16 +65,21 @@ var pages = function(dbot) { var quoteCount = dbot.db.quoteArrs[user].length; } - if(!dbot.db.kicks.hasOwnProperty(req.params.user)) { - var kicks = '0'; - } else { - var kicks = dbot.db.kicks[req.params.user]; - } + if(dbot.config.moduleNames.include('kick')) { + if(!dbot.db.kicks.hasOwnProperty(req.params.user)) { + var kicks = '0'; + } else { + var kicks = dbot.db.kicks[req.params.user]; + } - if(!dbot.db.kickers.hasOwnProperty(req.params.user)) { - var kicked = '0'; + if(!dbot.db.kickers.hasOwnProperty(req.params.user)) { + var kicked = '0'; + } else { + var kicked = dbot.db.kickers[req.params.user]; + } } 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, diff --git a/views/users/users.jade b/views/users/users.jade index 67b005e..b197b23 100644 --- a/views/users/users.jade +++ b/views/users/users.jade @@ -7,7 +7,7 @@ block content ul#quotelist -each nick in nicks 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.active li.quotes #{nick.name} (Online, Active)