1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 16:35:40 -04:00

adding support for not suggesting things when backdressed

This commit is contained in:
Ryan Voots 2010-03-12 14:14:03 -05:00
parent 2c296fcd82
commit 5e72911b37
2 changed files with 3 additions and 2 deletions

View file

@ -309,6 +309,7 @@ sub _said {
$said->{body} = $body;
$said->{addressed} = 1;
$said->{addressed_as} = $1;
$said->{backdressed} = 1;
}
}

View file

@ -517,7 +517,7 @@ sub basic_get_fact {
my $matches = $self->_soundex_matches( $soundex );
if( $matches and @$matches ) {
if( ($matches and @$matches) && (!$said->{backdressed}) ) {
return "No factoid found. Did you mean one of these: " . join " ", map "[$_]", @$matches;
}
else {