]> git.donarmstrong.com Git - infobot.git/commitdiff
Moved w3 regex here
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Dec 2000 13:50:04 +0000 (13:50 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Dec 2000 13:50:04 +0000 (13:50 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@179 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/W3Search.pl

index 470bb8d7a89c1c62a2ad95c4896250caba419b81..31cccd7f40c3db6fa5efc30f5afd6adaf70d099d 100644 (file)
@@ -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 {