3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

Allow multiple undos on one line

This commit is contained in:
Pragmatic Software 2010-05-15 00:27:07 +00:00
parent 26c84fa621
commit 244e91b3fd

View File

@ -119,10 +119,11 @@ my $subcode = $code;
my $got_undo = 0;
my $got_sub = 0;
if($subcode =~ s/^\s*undo//) {
while($subcode =~ s/^\s*(and)?\s*undo//) {
splice @last_code, 0, 1;
if(not defined $last_code[0]) {
print "$nick: No more undos remaining.\n";
exit 0;
} else {
$code = $last_code[0];
$got_undo = 1;