3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

OH THE SHAME. THE SHAME OF IT ALL.

This commit is contained in:
Luke Slater 2012-12-11 21:01:37 +00:00
parent 19c3497f11
commit 65414f6975

View File

@ -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}));
}
},
};