From 201f3648d11d383e237779961705dde22a56cfa9 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 27 Feb 2012 15:15:30 +0000 Subject: [PATCH] delete category when rmlast makes empty quote category --- modules/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quotes.js b/modules/quotes.js index d27fedb..d82679b 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -52,7 +52,7 @@ var quotes = function(dbot) { if(quotes.hasOwnProperty(q[1])) { if(!dbot.db.locks.include(q[1]) || data.user == dbot.admin) { var quote = quotes[key].pop(); - if(quotes[key].length) { + if(quotes[key].length === 0) { delete quotes[key]; } rmAllowed = false;