@verb #555:"tell_www_page" this none this rxdo #789 @program #555:"tell_www_page" this none this if (!player:isa($webber) || !(caller in {$www, this, this.owner})) raise(E_PERM) elseif (!$ticketmaster:authorized()) $www.error:forbidden() elseif (index(prepstr, "/setup") == 1) return pass(@args) elseif (question = $www:parse_GET("q")) question = tostr(" ", question, " ") for accent in ({"À", "Á", "Â", "Ä", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ò", "Ó", "Ô", "Ö", "Ù", "Ú", "Û", "Ü", "Ç"}) question = strsub(question, accent, accent[2]) endfor puncts = "#-3,./|\\" for punct in [1..length(puncts)] question = strsub(question, puncts[punct], " ") endfor oldstr = "" while (question != oldstr) oldstr = question question = strsub(question, " ", " ") endwhile pages = {} for page in (this.db) pageok = 0 for line in (page[1]) if (line && line[1] == "!") line = line[2..$] not = 1 else if (pageok) continue line endif not = 0 endif questioncopy = question lineok = 1 for word in (line) if (x = index(questioncopy, word)) questioncopy = questioncopy[x + length(word)..$] else lineok = 0 break word endif endfor if (lineok) if (not) pageok = 0 continue page endif pageok = 1 endif endfor if (pageok) pages = {@pages, {page[2], page[3]}} endif $command_utils:suspend_if_needed() endfor if (!pages) pages = {{"huh.html", "Huh?!? ********************"}} endif this:fileappend("log.txt", tostr(question, " (", $string_utils:connection_hostname(connection_name(player)), " ", ctime(), ")")) for page in (pages) this:fileappend("log.txt", " => " + page[$]) endfor else pages = {{"index.html"}} endif if (length(pages) == 1) player:tell($www.error:moved_temporarily($www:fileURL(this, pages[1][1] + prepstr + dobjstr))) else this:tell_multiple_page(pages) endif "Last modified by Slacker (#55) on Mon Jun 21 05:47:13 1999 MDT." .