line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Bot::Slackbot; |
2
|
6
|
|
|
6
|
|
42
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
163
|
|
3
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1804
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub try { |
6
|
212
|
|
|
212
|
1
|
490
|
my ($class, $d) = @_; |
7
|
|
|
|
|
|
|
|
8
|
212
|
100
|
|
|
|
486
|
if ( index($d->ua, 'Slackbot-LinkExpanding ') > -1 ) { |
9
|
2
|
|
|
|
|
7
|
my $h = { |
10
|
|
|
|
|
|
|
name => 'Slackbot Link Expanding', |
11
|
|
|
|
|
|
|
is_bot => 1, |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
15
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! ([\d.]+) \(!); |
16
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
8
|
return $h; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
210
|
100
|
|
|
|
518
|
if ( index($d->ua, 'Slack-ImgProxy ') > -1 ) { |
23
|
2
|
|
|
|
|
8
|
my $h = { |
24
|
|
|
|
|
|
|
name => 'Slack Imgproxy', |
25
|
|
|
|
|
|
|
is_bot => 1, |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
2
|
100
|
|
|
|
8
|
if ($d->opt_version) { |
29
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m! ([\d.]+) \(!); |
30
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
8
|
return $h; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
208
|
100
|
|
|
|
474
|
if ( index($d->ua, 'Slackbot ') > -1 ) { |
37
|
2
|
|
|
|
|
7
|
my $h = { |
38
|
|
|
|
|
|
|
name => 'Slackbot', |
39
|
|
|
|
|
|
|
is_bot => 1, |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
|
42
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
43
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! ([\d.]+)\(!); |
44
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
6
|
return $h; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |