diff --git a/modules/quotes.js b/modules/quotes.js index 685df03..5c4854a 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -94,7 +94,7 @@ var quotes = function(dbot) { if(!Object.isArray(quotes[q[1]])) { quotes[q[1]] = []; } else { - if (q2 in quotes[q[1]]) { + if (q[2] in quotes[q[1]]) { dbot.say(data.channel, 'Quote already in DB. Initiate incineration.'); return; } @@ -181,4 +181,4 @@ var quotes = function(dbot) { exports.fetch = function(dbot) { return quotes(dbot); -}; \ No newline at end of file +};