mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +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 $dashes = () = $hint =~ /-/g;
|
||||
my $underscores = () = $hint =~ /_/g;
|
||||
my $dquotes = () = $hint =~ /"/g;
|
||||
|
||||
|
||||
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 $char = substr($hint, $index, 1);
|
||||
next if $char eq ' ';
|
||||
next if $char eq '-';
|
||||
next if $char eq '_';
|
||||
next if $char eq '"';
|
||||
next if grep { $index eq $_ } @indices;
|
||||
push @indices, $index;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user