From: dms Date: Sun, 3 Dec 2000 13:50:04 +0000 (+0000) Subject: Moved w3 regex here X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=486059f4129c4605bda8f1abbda4eeb33c6d6fc7;p=infobot.git Moved w3 regex here git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@179 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/W3Search.pl b/src/Modules/W3Search.pl index 470bb8d..31cccd7 100644 --- a/src/Modules/W3Search.pl +++ b/src/Modules/W3Search.pl @@ -5,6 +5,10 @@ package W3Search; use strict; +use vars qw(@W3Search_engines $W3Search_regex); +@W3Search_engines = qw(AltaVista Dejanews Excite Gopher HotBot Infoseek + Lycos Magellan PLweb SFgate Simple Verity Google); +$W3Search_regex = join '|', @W3Search_engines; my $maxshow = 3; @@ -14,7 +18,11 @@ sub W3Search { return unless &main::loadPerlModule("WWW::Search"); - my @matches = grep { lc($_) eq lc($where) ? $_ : undef } @main::W3Search_engines; + if (defined $type) { + &main::DEBUG("W3S: type => $type"); + } + + my @matches = grep { lc($_) eq lc($where) ? $_ : undef } @W3Search_engines; if (@matches) { $where = shift @matches; } else {