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:
parent
0ab6a46008
commit
652cad7ddf
@ -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 $@;
|
||||
|
Loading…
Reference in New Issue
Block a user