3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-06 03:59:31 +01:00

Plugin/GoogleSearch: show 3 matches instead of 1

This commit is contained in:
Pragmatic Software 2022-06-25 17:31:40 -07:00
parent 553fdb884c
commit c0ade8a2f6

View File

@ -38,7 +38,7 @@ sub cmd_googlesearch {
my ($self, $context) = @_; my ($self, $context) = @_;
return "Usage: google [-n <number of results>] query\n" if not length $context->{arguments}; return "Usage: google [-n <number of results>] query\n" if not length $context->{arguments};
my $matches = 1; my $matches = 3;
$matches = $1 if $context->{arguments} =~ s/-n\s+([0-9]+)\s*//; $matches = $1 if $context->{arguments} =~ s/-n\s+([0-9]+)\s*//;
$matches = 10 if $matches > 10; $matches = 10 if $matches > 10;