[kde-services-devel] r499 - trunk/scripts

josef at new.kstuff.org josef at new.kstuff.org
Fri Feb 13 07:44:12 CET 2009


Author: josef
Date: 2009-02-13 07:44:11 +0100 (Fri, 13 Feb 2009)
New Revision: 499

Modified:
   trunk/scripts/commitfilter-disable
Log:
- information about bounce status



Modified: trunk/scripts/commitfilter-disable
===================================================================
--- trunk/scripts/commitfilter-disable	2009-02-13 06:36:08 UTC (rev 498)
+++ trunk/scripts/commitfilter-disable	2009-02-13 06:44:11 UTC (rev 499)
@@ -74,13 +74,13 @@
 
 foreach my $address(@ARGV){
 	my ($res, $res2);
-	my ($name, $rulescount, $authorrulescount);
-	$res = $conn->prepare("SELECT username FROM users WHERE email = '$address'");
+	my ($name, $rulescount, $authorrulescount, $bounces, $disabled);
+	$res = $conn->prepare("SELECT username, bounces, disabled FROM users WHERE email = '$address'");
 	$res->execute();
-	$res->bind_columns(\$name);
-	if($res->fetch()){
+	$res->bind_columns(\$name, \$bounces, \$disabled);
+	while($res->fetch()){
 		push @users, $name;
-		print "Removing '$name' ($address)?\n";
+		print "Disabling '$name' ($address)?\n";
 		$res2 = $conn->prepare("SELECT COUNT(*) FROM rules WHERE username = '$name'");
 		$res2->execute();
 		$res2->bind_columns(\$rulescount);
@@ -93,14 +93,16 @@
 		$res2->finish();
 		print "- $rulescount directory rules\n";
 		print "- $authorrulescount author rules\n";
-	}else{
+		print "- $bounces bounces (already disabled: $disabled)\n";
+	}
+	if(!$res->rows()){
 		print "No such address '$address'.\n";
 		exit 1;
 	}
 	$res->finish();
 }
 
-print "Really remove all [y/n]?\n";
+print "Really disable this/these account(s) with all its/their rules [y/n]?\n";
 my $decision = <STDIN>;
 chomp $decision;
 



More information about the kde-services-devel mailing list