mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +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) {
|
unless ($deleted) {
|
||||||
|
return "There are no more undos remaining for [$channel] $trigger." if not $undos->{idx};
|
||||||
$undos->{idx}--;
|
$undos->{idx}--;
|
||||||
eval { store $undos, "$path/$trigger_safe.$channel_path_safe.undo"; };
|
eval { store $undos, "$path/$trigger_safe.$channel_path_safe.undo"; };
|
||||||
$self->{pbot}->{logger}->log("Error storing undo: $@\n") if $@;
|
$self->{pbot}->{logger}->log("Error storing undo: $@\n") if $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user