Ignore:
Timestamp:
May 22, 2010, 6:43:32 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
89ab5c8
Parents:
5e24227
git-author:
Nelson Elhage <nelhage@mit.edu> (05/20/10 19:22:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/22/10 18:43:32)
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

    r5e24227 raa0a0b5  
    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    );
     
    539539    my $jwrite_thread  = "";
    540540    my $jwrite_subject = "";
     541    my $jwrite_body;
    541542    my ($to, $from);
    542543    my $jwrite_type    = "chat";
     
    550551        'subject=s' => \$jwrite_subject,
    551552        'account=s' => \$from,
    552         'id=s'     =>  \$jwrite_sid,
     553        'id=s'      => \$jwrite_sid,
     554        'message=s' => \$jwrite_body,
    553555    ) or die("Usage: jwrite <jid> [-t <thread>] [-s <subject>] [-a <account>]\n");
    554556    $jwrite_type = 'groupchat' if $gc;
     
    588590        type    => $jwrite_type
    589591    };
     592
     593    if (defined($jwrite_body)) {
     594        process_owl_jwrite($jwrite_body);
     595        return;
     596    }
    590597
    591598    if(scalar @candidates > 1) {
Note: See TracChangeset for help on using the changeset viewer.