Show number of matching quotes only if more than one match

This commit is contained in:
Pragmatic Software 2013-06-09 00:04:20 +00:00
parent 0f234734b8
commit 8d6c2587a8
2 changed files with 5 additions and 3 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 407, BUILD_REVISION => 408,
BUILD_DATE => "2013-06-04", BUILD_DATE => "2013-06-08",
}; };
1; 1;

View File

@ -100,7 +100,9 @@ if($#quotes < 0) {
$t = $quotes[int rand($#quotes + 1)]; $t = $quotes[int rand($#quotes + 1)];
if($#ARGV > -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); my $quote = chr(226) . chr(128) . chr(156);