Here is a patch.

Index: poppass
===================================================================
--- poppass     (revision 5151)
+++ poppass     (working copy)
@@ -120,22 +120,19 @@
                Type     => SOCK_STREAM) or
                ( $msg = "No Response from poppass server:[EMAIL PROTECTED]", 
return $status = 0 );
 
+        my $seq = 0;
        while ($_ = <$socket>) {
                s/\n//g;
                s/\r//g;
                print "$_ <br>\n" if $DEBUG;
-               /200 poppassd/ && 
-                       (popout("USER $username"), next );
-               /200.*[Yy]our password please/ && 
-                       (popout("PASS $password"), next );
-               /200.*new password/ &&
-                       (popout("NEWPASS $newpassword"), next );
-               /200 Password changed/ && 
-                       ( $msg = "Password successfully changed", $status = 1, 
last );
-               /200 Bye/ && 
-                       (popout("QUIT"), last );
-               /500/ && ( s/500//, $msg = $_, $status = undef, last );
-               // && ( $msg = "No Response from server", $status = 0, last );
+               /^500/ && ( s/^500//, $msg = $_, $status = undef, last );
+               ! /^200/ && ( $msg = "No Response from server", $status = 0, 
last );
+                ++$seq;
+                $seq == 1 && (popout("USER $username"), next );
+                $seq == 2 && (popout("PASS $password"), next );
+                $seq == 3 && (popout("NEWPASS $newpassword"), next );
+                $seq == 4 && ($msg = "Password successfully changed",
+                             $status = 1, popout("QUIT"), last );
        }
     close($socket);
   }; #eval




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to