From d5e5bafd3fbb1597cad8eb93ee722fdf9bac6145 Mon Sep 17 00:00:00 2001 From: dms Date: Sun, 3 Dec 2000 13:47:36 +0000 Subject: [PATCH] Removed W3 regex git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@177 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/CommandStubs.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CommandStubs.pl b/src/CommandStubs.pl index c5eb989..78de79c 100644 --- a/src/CommandStubs.pl +++ b/src/CommandStubs.pl @@ -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; -- 2.39.2