Webster the Spellbot
   Hacked by Alan Schwartz (Javelin@BelgI)
   (Some code comes from robot.simple.c at ferkel.ucsb.edu)
   (No warranty granted or implied :)

Webster is a MUSH robot which provides an interface to the Unix 'spell' 
command in order to serve as a spell-checker for players. Because
'spell' is slow, Webster maintains a queue of spell requests and services
this queue, paging misspelled words back to the player who made the
request.

File list:
	web.h.dist		Include file
	web.c.dist		Source code
	run-web.dist		Shell script to run webster
	addspell.dist		Useful utility for local dictionaries
	spellobj.msh		A MUSH master room object to use as
				a safe interface to Webster.

INSTALLATION

I. From the account

Copy the files web.h.dist and web.c.dist to web.h and web.c
In fact, copy all the .dist files, removing the .dist.
Edit web.h to set parameters. In particular, don't set Webster's password
	(MYPASS) to an English word, and be sure you read about the
	DICTIONARY define.
If you want to use British spellings, find the line in web.c about
	pipecom, and change the 'spell \"%s\"' part to be
	'spell -b \"%s\"'.
Compile web.c. On my system, that's:
	cc -o web web.c

II. From the MUSH

Create a character named Webster, with the appropriate password from web.h
Create a room for Webster, and put it there. Link it there. Set the
	home FLOATING, and don't make exits into it. Webster is operated
	solely by pages.
If you want to use spellobj.msh, you should upload it (with a client
	or by hand) and then page-lock (@ulock) Webster to you and to
	the object that spellobj.msh creates. This prevents other players
	from somehow forcing Webster to disconnect, and sets up the
	+spell <obj>/<attr> and +spell <test> commands.

III. From the account again:

Run webster. I use the csh script run-web for this:
	run-web &
Webster will make a log of what it's doing to the file web.log. This log
	is way too extensive and you should probably hack Webster to 
	make it less verbose. I use it for debugging.


USING WEBSTER IN THE MUSH

Once Webster is connected, anything paged to Webster will be spellchecked,
unless Webster's password is part of the page, in which case Webster
will disconnect from the MUSH and the program will stop.

Webster assumes that the player paging it is to get the answer, and that
the first word of the page is the name of an attribute. This is useful
with the +spell <obj>/* command, so that Webster can return more useful
information about spelling errors. This is also why I recommend using 
+spell and page-locking webster, rather than allowing players to page
directly - Webster is easily spoofed. (In fact, +spell works by spoofing
Webster).

THE ADDSPELL SCRIPT

The addspell script is a convenient way to add words to your local
dictionary, which, according to the spell man page, should be a sorted
list of words, one per line (you don't have to add plurals, since spell
does derivations).

Syntax: addspell <word>
Addspell will create the local dictionary (edit it to set the filename)
if it doesn't exist, and will add the word if it's not already in the
dictionary, and resort the dictionary.

FUTURE RELEASES

Maybe. In any case, don't mail me with ideas for changes and stuff, since
this is just an aside for me. Thought I'd share it, is all. Hope you 
improve it.

A really great thing to do would be a Maas-Neotek (or other exploring robot)
which walks around the MUSH and automatically spellchecks rooms as it enters
them. Maybe I'll do that. :)

 - Alan (alansz@cogsci.berkeley.edu)
   Javelin@Belgariad
   Belkira@Belgariad II
   Indena@Mua'kaar


