diff --git a/modules/quotes/config.json b/modules/quotes/config.json index e8d0465..8fbb17a 100644 --- a/modules/quotes/config.json +++ b/modules/quotes/config.json @@ -3,5 +3,6 @@ "dependencies": [ "command", "users" ], "rmLimit": 10, "ignorable": true, + "quotesOnJoin": false, "help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md" } diff --git a/modules/quotes/quotes.js b/modules/quotes/quotes.js index f616a84..2305568 100644 --- a/modules/quotes/quotes.js +++ b/modules/quotes/quotes.js @@ -112,11 +112,13 @@ var quotes = function(dbot) { event.action = 'PRIVMSG'; event.params = event.message.split(' '); 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)); + if(this.config.quotesOnJoin == true) { + var userQuote = this.api.getQuote(event, event.user) + if(userQuote) { + event.reply(event.user + ': ' + this.api.getQuote(event, event.user)); + } } } }.bind(this);