3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-18 00:22:35 +01:00

delete category when rmlast makes empty quote category

This commit is contained in:
Luke Slater 2012-02-27 15:15:30 +00:00
parent 72fb19768a
commit 201f3648d1

View File

@ -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;