3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Fix factundo on deleted factoids

This commit is contained in:
Pragmatic Software 2017-10-04 17:56:16 -07:00
parent 0ab6a46008
commit 652cad7ddf

View File

@ -314,11 +314,8 @@ sub factundo {
}
}
if ($undos->{idx} == 0) {
return "There are no more undos remaining for [$channel] $trigger.";
}
unless ($deleted) {
return "There are no more undos remaining for [$channel] $trigger." if not $undos->{idx};
$undos->{idx}--;
eval { store $undos, "$path/$trigger_safe.$channel_path_safe.undo"; };
$self->{pbot}->{logger}->log("Error storing undo: $@\n") if $@;