Author: sparky
Date: Mon Oct 26 01:46:44 2009
New Revision: 10858

Modified:
   toys/rsget.pl/RSGet/Dispatch.pm
Log:
- simplified slots count


Modified: toys/rsget.pl/RSGet/Dispatch.pm
==============================================================================
--- toys/rsget.pl/RSGet/Dispatch.pm     (original)
+++ toys/rsget.pl/RSGet/Dispatch.pm     Mon Oct 26 01:46:44 2009
@@ -117,12 +117,11 @@
        my $cmd = shift;
        my $suggested = shift;
        my $max = setting( "max_slots" );
+       return 1 unless defined $suggested;
        if ( $cmd eq "check" ) {
-               return 0 | $1 if defined $suggested and $suggested =~ /^!(\d+)/;
-               return $max;
+               return $max unless defined $suggested and $suggested =~ s/^!//;
        }
-       return 1 unless defined $suggested;
-       if ( $suggested =~ /^!?\d+$/ ) {
+       if ( $suggested =~ /^\d+$/ ) {
                return $max if $max < $suggested;
                return 0 | $suggested;
        }
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to