line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Twirc::Plugin::BangCommands; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
14738
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
93
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
0
|
2933
|
sub new { bless {}, shift } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub preprocess { |
9
|
3
|
|
|
3
|
0
|
960
|
my (undef,undef,undef,undef, $textref) = @_; |
10
|
|
|
|
|
|
|
|
11
|
3
|
100
|
|
|
|
15
|
unless ( $$textref =~ s/^!\s*// ) { |
12
|
1
|
|
|
|
|
2
|
$$textref = "post $$textref"; |
13
|
|
|
|
|
|
|
} |
14
|
3
|
|
|
|
|
5
|
return; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
App::Twirc::Plugin::BangCommands - Commands prefixed with ! |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# in config (.yml in this example) |
28
|
|
|
|
|
|
|
plugins: |
29
|
|
|
|
|
|
|
-BangCommands |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# in your IRC clientt |
32
|
|
|
|
|
|
|
This is a status message (no "post" prefix necessary) |
33
|
|
|
|
|
|
|
!follow net_twitter |
34
|
|
|
|
|
|
|
!rate_limit_status |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
In your IRC client, text entered without an exclamation point (!) prefix will |
39
|
|
|
|
|
|
|
be posted as a status message. Commands start with an exclamation mark (!) |
40
|
|
|
|
|
|
|
prefix. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 AUTHOR |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Marc Mims <marc@questright.com> |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 LICENSE |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Copyright (c) 2009 Marc Mims |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
You may distribute this code and/or modify it under the same terms as Perl itself. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |