release-1.10release-1.7release-1.8release-1.9
Last change
on this file since da3596f was
8618438,
checked in by Nelson Elhage <nelhage@mit.edu>, 16 years ago
|
Implement receiving messages
|
-
Property mode set to
100644
|
File size:
667 bytes
|
Line | |
---|
1 | use warnings; |
---|
2 | use strict; |
---|
3 | |
---|
4 | =head1 NAME |
---|
5 | |
---|
6 | BarnOwl::Message::Twitter |
---|
7 | |
---|
8 | =head1 DESCRIPTION |
---|
9 | |
---|
10 | =cut |
---|
11 | |
---|
12 | package BarnOwl::Message::Twitter; |
---|
13 | use base qw(BarnOwl::Message); |
---|
14 | |
---|
15 | sub context {'twitter'} |
---|
16 | sub subcontext {undef} |
---|
17 | sub long_sender {"http://twitter.com/" . shift->sender} |
---|
18 | |
---|
19 | sub replycmd {'twitter'} |
---|
20 | |
---|
21 | sub smartfilter { |
---|
22 | my $self = shift; |
---|
23 | my $inst = shift; |
---|
24 | my $filter; |
---|
25 | |
---|
26 | if($inst) { |
---|
27 | $filter = "twitter-" . $self->sender; |
---|
28 | BarnOwl::command("filter", $filter, |
---|
29 | qw{type ^twitter$ and sender}, '^'.$self->sender.'$'); |
---|
30 | } else { |
---|
31 | $filter = "twitter"; |
---|
32 | } |
---|
33 | return $filter; |
---|
34 | } |
---|
35 | |
---|
36 | =head1 SEE ALSO |
---|
37 | |
---|
38 | Foo, Bar, Baz |
---|
39 | |
---|
40 | =cut |
---|
41 | |
---|
42 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.