mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-05 19:49:32 +01:00
Plugin/GoogleSearch: show 3 matches instead of 1
This commit is contained in:
parent
553fdb884c
commit
c0ade8a2f6
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user