From 9001cfefcf46bde609b5f25a52d254a28cc5b86b Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Tue, 13 Mar 2012 16:06:19 +0000 Subject: [PATCH] Fixed quotes --- run.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/run.js b/run.js index 609b825..1583aac 100644 --- a/run.js +++ b/run.js @@ -63,20 +63,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