mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
g.pl: show no results for vs mode as well
This commit is contained in:
parent
297095856a
commit
33a32d4409
@ -38,12 +38,12 @@ if ($arguments =~ m/(.*)\svs\s(.*)/i) {
|
|||||||
my $result1 = $engine->search($a);
|
my $result1 = $engine->search($a);
|
||||||
my $result2 = $engine->search($b);
|
my $result2 = $engine->search($b);
|
||||||
|
|
||||||
if (not @{$result1->items}) {
|
if (not defined $result1 or not defined $result1->items or not @{$result1->items}) {
|
||||||
print "No results for $a\n";
|
print "No results for $a\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not @{$result2->items}) {
|
if (not defined $result2 or not defined $result2->items or not @{$result2->items}) {
|
||||||
print "No results for $b\n";
|
print "No results for $b\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user