зеркало из https://github.com/mozilla/pjs.git
The 'foo bugs' command should not be handled as a command, since it clashes with the 'help' command. Change it to a Baffled handler. b=115638, r=imajes
This commit is contained in:
Родитель
d11e131d06
Коммит
29e360e3cc
|
@ -53,9 +53,6 @@ sub Told {
|
|||
my $bug = $1;
|
||||
$self->FetchBug($event, $bug, 'bugs', 0, 0);
|
||||
$self->{'bugsHistory'}->{$target}->{$bug} = time() if $bug =~ /^[0-9]+$/os;
|
||||
} elsif ($message =~ /^\s*(...+?)\s+bugs\s*$/osi) {
|
||||
my $target = $event->{'target'};
|
||||
$self->FetchBug($event, $1, 'dwim', 0, 0);
|
||||
} elsif ($message =~ /^\s*bug-?total\s+(.+?)\s*$/osi) {
|
||||
$self->FetchBug($event, $1, 'total', 0, 0);
|
||||
} elsif ($self->isAdmin($event)) {
|
||||
|
@ -114,6 +111,18 @@ sub Heard {
|
|||
return 0; # we've dealt with it, no need to do anything else.
|
||||
}
|
||||
|
||||
sub Baffled {
|
||||
my $self = shift;
|
||||
my ($event, $message) = @_;
|
||||
if ($message =~ /^\s*(...+?)\s+bugs\s*$/osi) {
|
||||
my $target = $event->{'target'};
|
||||
$self->FetchBug($event, $1, 'dwim', 0, 0);
|
||||
} else {
|
||||
return $self->SUPER::Baffled(@_);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub Felt {
|
||||
my $self = shift;
|
||||
my ($event, $message) = @_;
|
||||
|
|
Загрузка…
Ссылка в новой задаче