[357] in BarnOwl Developers

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

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

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:05:17 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon,  8 Jan 2007 21:39:59 -0500 (EST)

Author: nelhage
Date: 2007-01-08 21:39:59 -0500 (Mon, 08 Jan 2007)
New Revision: 499

Modified:
   trunk/
   trunk/owl/perl/modules/jabber.pl
Log:
 r17880@phanatique:  nelhage | 2007-01-08 21:38:47 -0500
 perltidy'ing some code



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:17876
   + bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:17880

Modified: trunk/owl/perl/modules/jabber.pl
===================================================================
--- trunk/owl/perl/modules/jabber.pl	2007-01-09 00:39:23 UTC (rev 498)
+++ trunk/owl/perl/modules/jabber.pl	2007-01-09 02:39:59 UTC (rev 499)
@@ -346,27 +346,25 @@
         if ( !$status ) {
             $conn->removeConnection($jidStr);
             owl::error("We failed to connect");
-        }
-        else {
+        } else {
             my @result = $client->AuthSend( %{ $vars{jlogin_authhash} } );
 
             if ( $result[0] ne 'ok' ) {
-            if ( !$vars{jlogin_havepass} && $result[0] eq '401' ) {
-                $vars{jlogin_havepass} = 1;
+                if ( !$vars{jlogin_havepass} && $result[0] eq '401' ) {
+                    $vars{jlogin_havepass} = 1;
+                    $conn->removeConnection($jidStr);
+                    owl::start_password( "Password for $jidStr: ", \&do_login );
+                    return "";
+                }
                 $conn->removeConnection($jidStr);
-                owl::start_password( "Password for $jidStr: ", \&do_login );
-                return "";
-            }
-            $conn->removeConnection($jidStr);
-            owl::error(
-                "Error in connect: " . join( " ", @result ) );
-        }
-            else {
+                owl::error( "Error in connect: " . join( " ", @result ) );
+            } else {
                 $conn->getRosterFromJidStr($jidStr)->fetch();
                 $client->PresenceSend( priority => 1 );
                 queue_admin_msg("Connected to jabber as $jidStr");
             }
         }
+
     }
     delete $vars{jlogin_jid};
     $vars{jlogin_password} =~ tr/\0-\377/x/;


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