From 652cad7ddf613c1f90f7121409d1633ea7f4557a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 4 Oct 2017 17:56:16 -0700 Subject: [PATCH] Fix factundo on deleted factoids --- PBot/FactoidCommands.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index 8f92f4f6..6a3c8baa 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -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 $@;