1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-08 04:45:41 -04:00

modified encoding for -q

This commit is contained in:
Ryan Voots 2010-04-05 14:29:09 -04:00
parent 4c837759f3
commit ebaedd7b51

View file

@ -9,6 +9,8 @@ sub {
if ($said->{body} =~ /-q\s+(.*)/i) #faq questions
{#http://perldoc.perl.org/search.html?q=foo+bar
my $query = uri_encode($1);
$query =~ s/%20/+/g;
$url = "http://perldoc.perl.org/search.html?q=".uri_encode($1);
}
elsif ($said->{body} =~ /-f\s+(.*?)\s*/i) #functions, only use the first part of a multiword expression