need to call interpolated quote with params

This commit is contained in:
Luke Slater 2012-03-17 13:42:15 +00:00
parent 77cc1ddafd
commit e6b50b248d

View File

@ -47,7 +47,7 @@ var quotes = function(dbot) {
q[1] = q[1].trim(); q[1] = q[1].trim();
key = q[1].toLowerCase(); key = q[1].toLowerCase();
if(quotes.hasOwnProperty(key)) { if(quotes.hasOwnProperty(key)) {
dbot.say(data.channel, q[1] + ': ' + interpolatedQuote(key)); dbot.say(data.channel, q[1] + ': ' + interpolatedQuote(key, params));
} else { } else {
dbot.say(data.channel, 'Nobody loves ' + q[1]); dbot.say(data.channel, 'Nobody loves ' + q[1]);
} }
@ -228,11 +228,11 @@ var quotes = function(dbot) {
'~rq': function(data, params) { '~rq': function(data, params) {
var rQuote = Object.keys(quotes).random(); var rQuote = Object.keys(quotes).random();
dbot.say(data.channel, rQuote + ': ' + interpolatedQuote(rQuote)); dbot.say(data.channel, rQuote + ': ' + interpolatedQuote(rQuote, params));
}, },
'~d': function(data, params) { '~d': function(data, params) {
dbot.say(data.channel, data.user + ': ' + interpolatedQuote(dbot.name)); dbot.say(data.channel, data.user + ': ' + interpolatedQuote(dbot.name, params));
}, },
'~link': function(data, params) { '~link': function(data, params) {