From 55115d8d16eb8dc955d4870984289ea101800873 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 17 Mar 2020 23:08:56 -0700 Subject: [PATCH] Factoids: improve "No such factoid" message when no matches found --- PBot/Factoids.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index c41167b1..862e7ba1 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -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?"; + } } }