Bug 557012 - [Crashstats] Mozbot should accept both http:// and https:// links. Patch by Tanner M. Young <mozilla.bugs@alyoung.com>, r=Wolf

git-svn-id: svn://10.0.0.236/trunk@260455 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
psychoticwolf%carolina.rr.com
2010-06-10 20:35:46 +00:00
parent e5e515abef
commit 71eb4e2f89

View File

@@ -16,7 +16,7 @@ sub Told {
my $self = shift;
my ($event, $message) = @_;
my @array = (); my $output = '';
push @array, $1 while ($message =~ /(?<!http:\/\/crash-stats.mozilla.com\/report\/index\/)(?|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}[01][0-9][0-3][0-9])|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-11dd-[a-f0-9]{4}-[a-f0-9]{12}))/osig);
push @array, $1 while ($message =~ /(?<!:\/\/crash-stats.mozilla.com\/report\/index\/)(?|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}[01][0-9][0-3][0-9])|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-11dd-[a-f0-9]{4}-[a-f0-9]{12}))/osig);
if ($#array > -1) {
$output .= 'http://crash-stats.mozilla.com/report/index/'.$_.' ' foreach (@array);
$self->say($event, $event->{'from'}.': '.$output);
@@ -30,7 +30,7 @@ sub Heard {
my $self = shift;
my ($event, $message) = @_;
my @array = (); my $output = '';
push @array, $1 while ($message =~ /(?<!http:\/\/crash-stats.mozilla.com\/report\/index\/)(?|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}[01][0-9][0-3][0-9])|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-11dd-[a-f0-9]{4}-[a-f0-9]{12}))/osig);
push @array, $1 while ($message =~ /(?<!:\/\/crash-stats.mozilla.com\/report\/index\/)(?|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}[01][0-9][0-3][0-9])|(?:bp-)?([a-f0-9]{8}-[a-f0-9]{4}-11dd-[a-f0-9]{4}-[a-f0-9]{12}))/osig);
if ($#array > -1) {
$output .= 'http://crash-stats.mozilla.com/report/index/'.$_.' ' foreach (@array);
$self->say($event, $event->{'from'}.': '.$output);