3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

quotes listener operational

This commit is contained in:
reality 2013-04-12 21:16:56 +00:00
parent b8a25062b5
commit b1f450a3e1

View File

@ -99,10 +99,11 @@ var quotes = function(dbot) {
dbot.instance.emit(event); dbot.instance.emit(event);
} }
} else if(event.action == 'JOIN') { } else if(event.action == 'JOIN') {
var userQuote = this.api.getQuote(event, event.user) var userQuote = this.api.getQuote(event.user, function(quote) {
if(userQuote) { if(quote) {
event.reply(event.user + ': ' + this.api.getQuote(event, event.user)); event.reply(event.user + ': ' + quote);
} }
});
} }
}.bind(this); }.bind(this);
this.on = ['PRIVMSG', 'JOIN']; this.on = ['PRIVMSG', 'JOIN'];