From e9971cf29dc8700e6a88188171e1d6af13d9116f Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 26 Aug 2017 21:40:27 -0700 Subject: [PATCH] Factlog revision for factredo now consistent --- PBot/FactoidCommands.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index 814800b5..c76fe2ad 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -264,11 +264,13 @@ sub factredo { return "There are no more redos reamining for [$channel] $trigger."; } - $self->log_factoid($channel, $trigger, "$nick!$user\@$host", "reverted (redo) to revision ". ($undos->{idx} + 1), 1); $undos->{idx}++; store $undos, "$path/$trigger.$channel_path.undo"; + $self->{pbot}->{factoids}->{factoids}->hash->{$channel}->{$trigger} = $undos->{list}->[$undos->{idx}]; + + $self->log_factoid($channel, $trigger, "$nick!$user\@$host", "reverted (redo) to revision ". ($undos->{idx} + 1), 1); return "[$channel] $trigger reverted to revision " . ($undos->{idx} + 1); }