mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
If we've checked spelling, don't let Infobot (for example) answer it too.
This commit is contained in:
parent
51621a7121
commit
bbbaaf451f
@ -23,7 +23,10 @@ sub Help {
|
||||
sub Told {
|
||||
my $self = shift;
|
||||
my ($event, $message) = @_;
|
||||
$self->checkSpelling($event, $message);
|
||||
if ($self->checkSpelling($event, $message)) {
|
||||
# we checked the spelling, abort
|
||||
return 0;
|
||||
}
|
||||
return $self->SUPER::Heard(@_);
|
||||
}
|
||||
|
||||
@ -46,7 +49,9 @@ sub checkSpelling {
|
||||
my $word = $1;
|
||||
# XXX escape $word
|
||||
$self->getURI($event, "http://www.m-w.com/cgi-bin/dictionary?va=$word", 'word', $1); # XXX should be configurable!
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub GotURI {
|
||||
|
Loading…
x
Reference in New Issue
Block a user