Changeset 6babb75 for lib/BarnOwl


Ignore:
Timestamp:
Jan 28, 2009, 1:27:41 PM (16 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
c1e5316
Parents:
b4b5a7e
Message:
Apply Jesse's @reply patch.
Location:
lib/BarnOwl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/BarnOwl/Message/Twitter.pm

    rb4b5a7e r6babb75  
    2222        return $self->replysendercmd;
    2323    } else {
    24         return 'twitter';
     24        return 'twitter-atreply '.$self->sender;
    2525    }
    2626}
  • lib/BarnOwl/Module/Twitter.pm

    r927c186 r6babb75  
    238238}
    239239
     240sub twitter_atreply {
     241    my $to  = shift;
     242    my $msg = shift;
     243    twitter("@".$to." ".$msg);
     244}
     245
    240246BarnOwl::new_command(twitter => \&cmd_twitter, {
    241247    summary     => 'Update Twitter from BarnOwl',
     
    250256    description => 'Send a Twitter Direct Message to USER'
    251257   });
     258
     259BarnOwl::new_command( 'twitter-atreply' => sub { cmd_twitter_atreply(@_); },
     260    {
     261    summary     => 'Send a Twitter @ message',
     262    usage       => 'twitter-atreply USER',
     263    description => 'Send a Twitter @reply Message to USER'
     264    }
     265);
     266
    252267
    253268sub cmd_twitter {
     
    268283}
    269284
     285sub cmd_twitter_atreply {
     286    my $cmd  = shift;
     287    my $user = shift;
     288    BarnOwl::start_edit_win("Reply to \@" . $user, sub { twitter_atreply($user, shift) });
     289}
     290
    270291eval {
    271292    $BarnOwl::Hooks::receiveMessage->add("BarnOwl::Module::Twitter::handle_message");
Note: See TracChangeset for help on using the changeset viewer.