[424] in BarnOwl Developers

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

[D-O-H] r555 - in trunk: . owl/perl/modules

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:06:00 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
Date: Tue, 23 Jan 2007 18:36:41 -0500
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU

Author: nelhage
Date: 2007-01-23 18:36:41 -0500 (Tue, 23 Jan 2007)
New Revision: 555

Modified:
   trunk/
   trunk/owl/perl/modules/jabber.pl
Log:
 r18171@phanatique:  nelhage | 2007-01-23 18:36:21 -0500
 jabberlogin accepts a password argument



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:18170
   + bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:18171

Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl	2007-01-23 23:36:27 UTC (rev 554)
+++ trunk/owl/perl/modules/jabber.pl	2007-01-23 23:36:41 UTC (rev 555)
@@ -345,7 +345,7 @@
     BarnOwl::new_command(
         jabberlogin => \&cmd_login,
         { summary => "Log into jabber", },
-        { usage   => "jabberlogin JID" }
+        { usage   => "jabberlogin JID [PASSWORD]" }
     );
     BarnOwl::new_command(
         jabberlogout => \&cmd_logout,
@@ -398,7 +398,9 @@
     my $cmd = shift;
     my $jid = new Net::XMPP::JID;
     $jid->SetJID(shift);
-
+    my $password = undef;
+    $password = shift if @_;
+    
     my $uid           = $jid->GetUserID();
     my $componentname = $jid->GetServer();
     my $resource      = $jid->GetResource() || 'owl';
@@ -418,7 +420,7 @@
     my ( $server, $port ) = getServerFromJID($jid);
 
     $vars{jlogin_jid} = $jidStr;
-    $vars{jlogin_havepass} = 0;
+    $vars{jlogin_password} = $password;
     $vars{jlogin_connhash} = {
         hostname      => $server,
         tls           => 1,
@@ -430,7 +432,7 @@
         resource => $resource,
     };
 
-    return do_login('');
+    return do_login($password);
 }
 
 sub do_login {


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