mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +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($nick_search eq ".*") {
|
||||
return "No quotes grabbed in $channel_search yet (use `rq <nick> <channel>` to specify the correct channel). Use `grab` to grab a quote.";
|
||||
} else {
|
||||
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.";
|
||||
my $result = "No quotes grabbed ";
|
||||
|
||||
if($channel_search ne '.*') {
|
||||
$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)];
|
||||
|
@ -13,8 +13,8 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 479,
|
||||
BUILD_DATE => "2014-02-04",
|
||||
BUILD_REVISION => 480,
|
||||
BUILD_DATE => "2014-02-10",
|
||||
};
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user