From 84bd092bae543f8e02eff4e4bfd645ee949bc7b3 Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 17 May 2013 07:04:57 +0000 Subject: [PATCH] Fix [#442] --- modules/quotes/config.json | 1 + modules/quotes/quotes.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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);