source: lib/BarnOwl/Message/Twitter.pm @ affa874

release-1.7release-1.8release-1.9
Last change on this file since affa874 was 8618438, checked in by Nelson Elhage <nelhage@mit.edu>, 13 years ago
Implement receiving messages
  • Property mode set to 100644
File size: 667 bytes
Line 
1use warnings;
2use strict;
3
4=head1 NAME
5
6BarnOwl::Message::Twitter
7
8=head1 DESCRIPTION
9
10=cut
11
12package BarnOwl::Message::Twitter;
13use base qw(BarnOwl::Message);
14
15sub context {'twitter'}
16sub subcontext {undef}
17sub long_sender {"http://twitter.com/" . shift->sender}
18
19sub replycmd {'twitter'}
20
21sub 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
38Foo, Bar, Baz
39
40=cut
41
421;
Note: See TracBrowser for help on using the repository browser.