mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-16 21:40:46 +01:00
Factlog revision for factredo now consistent
This commit is contained in:
parent
03b2b8d7b9
commit
e9971cf29d
@ -264,11 +264,13 @@ sub factredo {
|
|||||||
return "There are no more redos reamining for [$channel] $trigger.";
|
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}++;
|
$undos->{idx}++;
|
||||||
store $undos, "$path/$trigger.$channel_path.undo";
|
store $undos, "$path/$trigger.$channel_path.undo";
|
||||||
|
|
||||||
$self->{pbot}->{factoids}->{factoids}->hash->{$channel}->{$trigger} = $undos->{list}->[$undos->{idx}];
|
$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);
|
return "[$channel] $trigger reverted to revision " . ($undos->{idx} + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user