SVN: toys/rsget.pl/RSGet/Dispatch.pm

sparky sparky at pld-linux.org
Mon Oct 26 01:46:44 CET 2009


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;
 	}


More information about the pld-cvs-commit mailing list