This commit is contained in:
reality 2013-05-17 07:04:57 +00:00
parent 8f9b44d4f0
commit 84bd092bae
2 changed files with 7 additions and 4 deletions

View File

@ -3,5 +3,6 @@
"dependencies": [ "command", "users" ], "dependencies": [ "command", "users" ],
"rmLimit": 10, "rmLimit": 10,
"ignorable": true, "ignorable": true,
"quotesOnJoin": false,
"help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md" "help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md"
} }

View File

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