3
0
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:
Pragmatic Software 2018-01-05 19:45:28 -08:00
parent 297095856a
commit 33a32d4409

View File

@ -38,12 +38,12 @@ if ($arguments =~ m/(.*)\svs\s(.*)/i) {
my $result1 = $engine->search($a);
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";
exit;
}
if (not @{$result2->items}) {
if (not defined $result2 or not defined $result2->items or not @{$result2->items}) {
print "No results for $b\n";
exit;
}