mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-27 06:19:25 +01:00
Improve output when no matching quotes found for rq
command
This commit is contained in:
parent
29316b23ba
commit
6d8fac71fb
@ -448,11 +448,21 @@ sub show_random_quotegrab {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($#quotes < 0) {
|
if($#quotes < 0) {
|
||||||
if($nick_search eq ".*") {
|
my $result = "No quotes grabbed ";
|
||||||
return "No quotes grabbed in $channel_search yet (use `rq <nick> <channel>` to specify the correct channel). Use `grab` to grab a quote.";
|
|
||||||
} else {
|
if($channel_search ne '.*') {
|
||||||
return "No quotes grabbed for $nick_search in $channel_search yet (use `rq <nick> <channel>` to specify the correct channel).. Use `grab` to grab a quote.";
|
$result .= "in $channel_search ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($nick_search ne '.*') {
|
||||||
|
$result .= "for $nick_search ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($text_search ne '.*') {
|
||||||
|
$result .= "matching '$text_search' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result . "yet (use `rq <nick> <channel>` to specify the correct channel).. Use `grab` to grab a quote.";;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $quotegrab = $quotes[int rand($#quotes + 1)];
|
my $quotegrab = $quotes[int rand($#quotes + 1)];
|
||||||
|
@ -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 => 479,
|
BUILD_REVISION => 480,
|
||||||
BUILD_DATE => "2014-02-04",
|
BUILD_DATE => "2014-02-10",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user