diff --git a/modules/modehate.js b/modules/modehate.js index b769198..813a6ae 100644 --- a/modules/modehate.js +++ b/modules/modehate.js @@ -13,6 +13,8 @@ var modehate = function(dbot) { 'on': 'MODE' }; }; +~ajs dbot.instance.addListener('MODE', function(data) { if(data.channel == '#42' && data.raw[0].indexOf('Snow') != -1 && data.raw[0].indexOf('+o') != -1) { dbot.instance.send('MODE #42 -o Snow'); } } + exports.fetch = function(dbot) { return modehate(dbot); diff --git a/modules/quotes.js b/modules/quotes.js index d82679b..c5eb64b 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -16,6 +16,27 @@ var quotes = function(dbot) { } } }, + + // shows the biggest categories + '~qstats': function(data, params) { + var qSizes = []; + for(var cat in quotes) { + if(quotes[cat].length != 0) { + qSizes.push([cat, quotes[cat].length]); + } + } + + qSizes = qSizes.sort(function(a, b) { return a[1] - b[1]; }); + qSizes = qSizes.slice(kickArr.length - 10).reverse(); + + var qString = "Largest categories: "; + + for(var i=0;i