3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 13:12:42 +01:00

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

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?";
}
}
}