diff --git a/run.js b/run.js index 4f697dc..be13c93 100644 --- a/run.js +++ b/run.js @@ -68,20 +68,17 @@ var DBot = function(timers) { // Retrieve a random quote from a given category, interpolating any quote references (~~QUOTE CATEGORY~~) within it DBot.prototype.interpolatedQuote = function(key, quoteTree) { - if( quoteTree !== undefined && quoteTree.indexOf( key ) != -1 ) return ''; + if( quoteTree !== undefined && quoteTree.indexOf( key ) != -1 ) { console.log('nrll'); return ''; } else if( quoteTree === undefined ) quoteTree = []; var quoteString = this.db.quoteArrs[key].random(); - var quoteRefs; - while( (quoteRefs = quoteString.match(/~~([\d\w\s-]*)~~/)) ) { - quoteRefs = quoteRefs.slice(1); - for(var i=0;i