Factoids: improve "No such factoid" message when no matches found

This commit is contained in:
Pragmatic Software 2020-03-17 23:08:56 -07:00
parent 8ddd96c77d
commit 55115d8d16
1 changed files with 5 additions and 1 deletions

View File

@ -842,7 +842,11 @@ sub interpreter {
$msg_caller = "/msg $stuff->{nick} " if $stuff->{send_msg_to_caller};
my $ref_from = $stuff->{ref_from} ? "[$stuff->{ref_from}] " : "";
return $msg_caller . $ref_from . "No such factoid '$original_keyword'; did you mean $matches?";
if ($matches eq 'none') {
return $msg_caller . $ref_from . "No such factoid '$original_keyword'; no similar matches.";
} else {
return $msg_caller . $ref_from . "No such factoid '$original_keyword'; did you mean $matches?";
}
}
}