forked from GitHub/dbot
delete category when rmlast makes empty quote category
This commit is contained in:
parent
72fb19768a
commit
201f3648d1
@ -52,7 +52,7 @@ var quotes = function(dbot) {
|
|||||||
if(quotes.hasOwnProperty(q[1])) {
|
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();
|
var quote = quotes[key].pop();
|
||||||
if(quotes[key].length) {
|
if(quotes[key].length === 0) {
|
||||||
delete quotes[key];
|
delete quotes[key];
|
||||||
}
|
}
|
||||||
rmAllowed = false;
|
rmAllowed = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user