mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-18 14:30:40 +01:00
Factoids: improve "No such factoid" message when no matches found
This commit is contained in:
parent
8ddd96c77d
commit
55115d8d16
@ -842,9 +842,13 @@ sub interpreter {
|
||||
$msg_caller = "/msg $stuff->{nick} " if $stuff->{send_msg_to_caller};
|
||||
|
||||
my $ref_from = $stuff->{ref_from} ? "[$stuff->{ref_from}] " : "";
|
||||
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?";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $channel_name = $self->{factoids}->get_data($channel, '_name');
|
||||
my $trigger_name = $self->{factoids}->get_data($channel, $keyword, '_name');
|
||||
|
Loading…
x
Reference in New Issue
Block a user