mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
Merge pull request #25 from psquid/master
Remove category when emptied by ~rm.
This commit is contained in:
commit
95facfa381
@ -112,6 +112,9 @@ var quotes = function(dbot) {
|
||||
var index = quotes[q[1]].indexOf(q[2]);
|
||||
if(index != -1) {
|
||||
quotes[q[1]].splice(index, 1);
|
||||
if(quotes[q[1]].length === 0) {
|
||||
delete quotes[q[1]];
|
||||
}
|
||||
rmAllowed = false;
|
||||
dbot.say(data.channel, '\'' + q[2] + '\' removed from ' + q[1]);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user