3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Spinach: er, use \s not \b to get word count for one word detection

This commit is contained in:
Pragmatic Software 2019-05-13 18:04:09 -07:00
parent 7bec7a0320
commit 14601ef5f5

View File

@ -750,8 +750,8 @@ sub spinach_cmd {
$arguments = $self->normalize_text($arguments);
my @truth_count = split /\b/, $self->{state_data}->{current_question}->{answer};
my @lie_count = split /b/, $arguments;
my @truth_count = split /\s/, $self->{state_data}->{current_question}->{answer};
my @lie_count = split /\s/, $arguments;
if (@truth_count > 1 and @lie_count == 1) {
return "/msg $nick Your lie cannot be one word for this question. Please try again.";