[1005] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r990 - trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:12:03 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
To: dirty-owl-hackers@MIT.EDU
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Wed, 26 Mar 2008 02:24:26 -0400 (EDT)

Author: nelhage
Date: 2008-03-26 02:24:26 -0400 (Wed, 26 Mar 2008)
New Revision: 990

Modified:
   trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
Log:
Fix sending jabbers to JIDs beginning with `+'


Modified: trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
===================================================================
--- trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	2008-03-21 18:47:51 UTC (rev 989)
+++ trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	2008-03-26 06:24:26 UTC (rev 990)
@@ -24,6 +24,7 @@
 use Net::Jabber::MUC;
 use Net::DNS;
 use Getopt::Long;
+Getopt::Long::Configure(qw(no_getopt_compat prefix_pattern="-|--"));
 
 our $VERSION = 0.1;
 
@@ -476,7 +477,7 @@
         'subject=s' => \$jwrite_subject,
         'account=s' => \$from,
         'id=s'     =>  \$jwrite_sid,
-    );
+    ) or die("Usage: jwrite JID [-t thread] [-s 'subject'] [-a account]\n");
     $jwrite_type = 'groupchat' if $gc;
 
     if ( scalar @ARGV != 1 ) {
@@ -566,7 +567,7 @@
         }
 
         my $getopt = Getopt::Long::Parser->new;
-        $getopt->configure('pass_through');
+        $getopt->configure('pass_through', 'no_getopt_compat');
         $getopt->getoptions( 'account=s' => \$jid );
         $jid ||= defaultJID();
         if ($jid) {
@@ -730,7 +731,7 @@
         my @groups;
         my $purgeGroups;
         my $getopt = Getopt::Long::Parser->new;
-        $getopt->configure('pass_through');
+        $getopt->configure('pass_through', 'no_getopt_compat');
         $getopt->getoptions(
             'account=s' => \$jid,
             'group=s' => \@groups,


home help back first fref pref prev next nref lref last post