mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-01 23:14:09 +01:00
Show number of matching quotes only if more than one match
This commit is contained in:
parent
0f234734b8
commit
8d6c2587a8
@ -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;
|
||||||
|
@ -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) {
|
||||||
|
if($#quotes + 1 > 1) {
|
||||||
$t = "" . ($#quotes + 1) . " matching quote" . (($#quotes + 1) != 1 ? "s" : "") . " found. $t";
|
$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);
|
||||||
|
Loading…
Reference in New Issue
Block a user