forked from GitHub/dbot
delete category when rmlast makes empty quote category
This commit is contained in:
parent
81d34ce304
commit
1a6146b348
@ -52,6 +52,9 @@ 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) {
|
||||
delete quotes[key];
|
||||
}
|
||||
rmAllowed = false;
|
||||
dbot.say(data.channel, '\'' + quote + '\' removed from ' + q[1]);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user