]> git.donarmstrong.com Git - infobot.git/commitdiff
Removed W3 regex
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Dec 2000 13:47:36 +0000 (13:47 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 3 Dec 2000 13:47:36 +0000 (13:47 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@177 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/src/CommandStubs.pl

index c5eb98937559afab714072889ca33dfc59501d0b..78de79c0de25068bd1e6043ccda0fcc17fe3d90b 100644 (file)
@@ -4,10 +4,6 @@
 
 if (&IsParam("useStrict")) { 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;
 $babel::lang_regex = "";       # lame fix.
 
 ### PROPOSED COMMAND HOOK IMPLEMENTATION.
@@ -197,10 +193,14 @@ sub Modules {
     }
 
     # google searching. Simon++
-    if (&IsParam("wwwsearch") and $message =~ /^(?:search\s+)?($W3Search_regex)\s+for\s+['"]?(.*?)['"]?\s*\?*$/i) {
+    if (&IsParam("wwwsearch") and $message =~ /^(?:search\s+)?(\S+)\s+for\s+['"]?(.*?)['"]?\s*\?*$/i) {
        return $noreply unless (&hasParam("wwwsearch"));
 
-       &Forker("wwwsearch", sub { &W3Search::W3Search($1,$2,$param{'wwwsearch'}); } );
+       &DEBUG("wwwsearch: 1 => $1");
+       &DEBUG("wwwsearch: 2 => $2");
+       &DEBUG("wwwsearch: 3 => $3");
+
+       &Forker("wwwsearch", sub { &W3Search::W3Search($1,$2,$3); } );
 
        $cmdstats{'WWWSearch'}++;
        return $noreply;