mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-06 14:47:26 +02:00
Factoids: improve "No such factoid" message when no matches found
This commit is contained in:
parent
8ddd96c77d
commit
55115d8d16
@ -842,7 +842,11 @@ sub interpreter {
|
|||||||
$msg_caller = "/msg $stuff->{nick} " if $stuff->{send_msg_to_caller};
|
$msg_caller = "/msg $stuff->{nick} " if $stuff->{send_msg_to_caller};
|
||||||
|
|
||||||
my $ref_from = $stuff->{ref_from} ? "[$stuff->{ref_from}] " : "";
|
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?";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user