From 78508dd1a55a84642f970f171475fa79057dd3b3 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Wed, 12 Oct 2011 15:36:51 +0100 Subject: [PATCH] qadd reality ban --- modules/quotes.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/quotes.js b/modules/quotes.js index af139e5..60257c1 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -116,10 +116,16 @@ var quotes = function(dbot) { } if(once) { - dbot.db.quoteArrs['realityonce'].push('reality ' + once[1] + '.'); - addStack.push('realityonce'); - rmAllowed = true; - dbot.instance.say(data.channel, '\'reality ' + once[1] + '.\' saved.'); + if((this.db.bans.hasOwnProperty('~qadd') && + this.db.bans['~qadd'].include(data.user)) || + this.db.bans['*'].include(data.user)) { + this.say(data.channel, data.user + ' is banned from using this command. Commence incineration.'); + } else { + dbot.db.quoteArrs['realityonce'].push('reality ' + once[1] + '.'); + addStack.push('realityonce'); + rmAllowed = true; + dbot.instance.say(data.channel, '\'reality ' + once[1] + '.\' saved.'); + } } },