mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Show double-quotes in hints
This commit is contained in:
parent
7a0d502fee
commit
106690eb73
@ -84,14 +84,17 @@ my $hidden_character_count = int length ($hint) * $hints[$hint_counter > $#hints
|
|||||||
my $spaces = () = $hint =~ / /g;
|
my $spaces = () = $hint =~ / /g;
|
||||||
my $dashes = () = $hint =~ /-/g;
|
my $dashes = () = $hint =~ /-/g;
|
||||||
my $underscores = () = $hint =~ /_/g;
|
my $underscores = () = $hint =~ /_/g;
|
||||||
|
my $dquotes = () = $hint =~ /"/g;
|
||||||
|
|
||||||
|
|
||||||
my @indices;
|
my @indices;
|
||||||
while (@indices <= $hidden_character_count - $spaces - $dashes - $underscores) {
|
while (@indices <= $hidden_character_count - $spaces - $dashes - $underscores - $dquotes) {
|
||||||
my $index = int rand($length);
|
my $index = int rand($length);
|
||||||
my $char = substr($hint, $index, 1);
|
my $char = substr($hint, $index, 1);
|
||||||
next if $char eq ' ';
|
next if $char eq ' ';
|
||||||
next if $char eq '-';
|
next if $char eq '-';
|
||||||
next if $char eq '_';
|
next if $char eq '_';
|
||||||
|
next if $char eq '"';
|
||||||
next if grep { $index eq $_ } @indices;
|
next if grep { $index eq $_ } @indices;
|
||||||
push @indices, $index;
|
push @indices, $index;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user