From 23cd0218acb6c7e53fbc0f273d8ccc9ce95463b9 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 13 Feb 2012 03:48:56 +0000 Subject: [PATCH 1/2] admin can bypass locks --- modules/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quotes.js b/modules/quotes.js index b4c8b4c..184f803 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -54,7 +54,7 @@ var quotes = function(dbot) { q[1] = q[1].trim() key = q[1].toLowerCase(); if(quotes.hasOwnProperty(q[1])) { - if(!dbot.db.locks.include(q[1])) { + if(!dbot.db.locks.include(q[1]) && data.user != dbot.admin) { var quote = quotes[key].pop(); rmAllowed = false; dbot.say(data.channel, '\'' + quote + '\' removed from ' + q[1]); From 8783990d7f14d66ba522417f95562361b562ddca Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 13 Feb 2012 03:50:39 +0000 Subject: [PATCH 2/2] admin can bypass locks --- modules/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quotes.js b/modules/quotes.js index 184f803..c4d7888 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -54,7 +54,7 @@ var quotes = function(dbot) { q[1] = q[1].trim() key = q[1].toLowerCase(); if(quotes.hasOwnProperty(q[1])) { - if(!dbot.db.locks.include(q[1]) && data.user != dbot.admin) { + if(!dbot.db.locks.include(q[1]) || data.user == dbot.admin) { var quote = quotes[key].pop(); rmAllowed = false; dbot.say(data.channel, '\'' + quote + '\' removed from ' + q[1]);