From 8d6c2587a86dc8b0273d96c1d9a61d2df8529d49 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 9 Jun 2013 00:04:20 +0000 Subject: [PATCH] Show number of matching quotes only if more than one match --- PBot/VERSION.pm | 4 ++-- modules/random_quote.pl | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 6efb4106..78d0ebb8 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 407, - BUILD_DATE => "2013-06-04", + BUILD_REVISION => 408, + BUILD_DATE => "2013-06-08", }; 1; diff --git a/modules/random_quote.pl b/modules/random_quote.pl index 1f8e6e74..4d28376c 100755 --- a/modules/random_quote.pl +++ b/modules/random_quote.pl @@ -100,7 +100,9 @@ if($#quotes < 0) { $t = $quotes[int rand($#quotes + 1)]; if($#ARGV > -1) { - $t = "" . ($#quotes + 1) . " matching quote" . (($#quotes + 1) != 1 ? "s" : "") . " found. $t"; + if($#quotes + 1 > 1) { + $t = "" . ($#quotes + 1) . " matching quote" . (($#quotes + 1) != 1 ? "s" : "") . " found. $t"; + } } my $quote = chr(226) . chr(128) . chr(156);