3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

delete category when rmlast makes empty quote category

This commit is contained in:
Luke Slater 2012-02-27 15:14:08 +00:00
parent 1a6146b348
commit 72fb19768a

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] === undefined) {
if(quotes[key].length) {
delete quotes[key];
}
rmAllowed = false;