Changeset a484b3e


Ignore:
Timestamp:
Jul 17, 2010, 7:26:41 AM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.6
Children:
6758c74
Parents:
612270d
git-author:
Nelson Elhage <nelhage@mit.edu> (05/20/10 19:22:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/17/10 07:26:41)
Message:
Jabber: Accept a -m argument to jwrite to set the message.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    rbd1532f ra484b3e  
    285285        {
    286286            summary => "Send a Jabber Message",
    287             usage   => "jwrite <jid> [-t <thread>] [-s <subject>] [-a <account>]"
     287            usage   => "jwrite <jid> [-t <thread>] [-s <subject>] [-a <account>] [-m <message>]"
    288288        }
    289289    );
     
    544544    my $jwrite_thread  = "";
    545545    my $jwrite_subject = "";
     546    my $jwrite_body;
    546547    my ($to, $from);
    547548    my $jwrite_type    = "chat";
     
    555556        'subject=s' => \$jwrite_subject,
    556557        'account=s' => \$from,
    557         'id=s'     =>  \$jwrite_sid,
     558        'id=s'      => \$jwrite_sid,
     559        'message=s' => \$jwrite_body,
    558560    ) or die("Usage: jwrite <jid> [-t <thread>] [-s <subject>] [-a <account>]\n");
    559561    $jwrite_type = 'groupchat' if $gc;
     
    595597        type    => $jwrite_type
    596598    };
     599
     600    if (defined($jwrite_body)) {
     601        process_owl_jwrite($jwrite_body);
     602        return;
     603    }
    597604
    598605    if(scalar @candidates > 1) {
Note: See TracChangeset for help on using the changeset viewer.