3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Factlog revision for factredo now consistent

This commit is contained in:
Pragmatic Software 2017-08-26 21:40:27 -07:00
parent 03b2b8d7b9
commit e9971cf29d

View File

@ -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);
}