From 65414f6975f9401e6a85ebf046e5259d13cadb8b Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 11 Dec 2012 21:01:37 +0000 Subject: [PATCH] OH THE SHAME. THE SHAME OF IT ALL. --- modules/quotes/quotes.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/quotes/quotes.js b/modules/quotes/quotes.js index 582f4e8..772930e 100644 --- a/modules/quotes/quotes.js +++ b/modules/quotes/quotes.js @@ -156,7 +156,9 @@ var quotes = function(dbot) { } else { // Give total quote count var totalQuoteCount = 0; for(var category in quotes) { - totalQuoteCount += category.length; + if(quotes.hasOwnProperty(category)) { + totalQuoteCount += quotes[category].length; + } } event.reply(dbot.t('total_quotes', {'count': totalQuoteCount})); } @@ -190,7 +192,7 @@ var quotes = function(dbot) { 'url': dbot.t('url', {'host': dbot.webHost, 'port': dbot.webPort, 'path': 'quotes/' + key})})); } else { - event.reply(dbot.t('category_not_found')); + event.reply(dbot.t('category_not_found', {'category': key})); } }, };