3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +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);
}
} else if(event.action == 'JOIN') {
var userQuote = this.api.getQuote(event, event.user)
if(userQuote) {
event.reply(event.user + ': ' + this.api.getQuote(event, event.user));
}
var userQuote = this.api.getQuote(event.user, function(quote) {
if(quote) {
event.reply(event.user + ': ' + quote);
}
});
}
}.bind(this);
this.on = ['PRIVMSG', 'JOIN'];