This client is now usuable run as a daemon to accept telnet IRC
connections.  All changes to the ircII source have been marked with
"#ifdef TELNET_CLIENT" (most also marked with comments containing
HENDRIX describing what they do)... the corresponding "#define
TELNET_CLIENT" has been added to config.h.

Description on how this telnet IRC works:
 - Read INSTALL on what you need to do to install, customize, and
   run this telnet client.

 - irctelnetd runs in the background.  It watches for connections
   on 3 ports (12345, 12346, and 12349, by default).

 - Connections on port 12345 are treated as requests for a client
   that performs terminal emulation.  irctelnetd negotiates proper
   telnet parameters with the telnet program on the remote end
   (specifically, ECHO ON and SINGLE CHAR modes).  Then it queries
   the telnet program for the type of terminal emulation to use.

   * In irc.c, there is a translation table from the requested terminal
     type to compatible terminal types supported locally.  This is set
	 up for Sun (cuz it's what I ran on) and translates any DEC type
	 terminal to vt100.  You can feel free to add to this.  If you
	 watch 'irctelnet.log', you'll see an entry seeing what the remote
	 telnet requested for a terminal type, and what it was given.

   Unsupported terminal types are caught later and a message sent to
   the remote user to either 'setenv TERM vt100' or use port 12346.
   The actual terminal emulation is done by setting TERM from inside
   irctelnetd and 'dumb' to FALSE, then letting ircII do the rest.

 - Connections on port 12346 are treated as requests for a dumb client
   that does no temrinal emulation.  This is easy... just set 'dumb'
   to TRUE.

 - In either of these two situations, after determining what terminal
   emulation to use, if any, we make sure we haven't exceeded the
   maximum users, build an IRCNAME for this user which includes their
   telnetting site, then fork off a process to handle their ircII
   client.  The telnetting site is also checked against a "shitlist"
   to see if the client is to be denied access to the telnet client.

 - Connections on port 12349 are treated as requests to list all
   current telnet users.  The telnetting site is verified against
   a mask of allowed sites to perform admin functions.  If it passes,
   a list of all current telnet users is provided, listing site, PID,
   and connect time.  The PID is listed as an easy way to kill idle
   telnet IRC users... just kill the PID.  No subprocess is created
   for connections on port 12349.

 - irctelnetd runs until killed.  Be aware that you also must kill
   all forked processes as well, or currently connected users will
   remain connected.

Files used by Hendrix telnet IRC:
 - lib/.ircrc is the default .ircrc file for telnet client users.
   It cannot be SAVEd over by telnet users (not any more, anyway) :)

 - lib/ircII.motd is the message of the day file... it will be
   displayed to EVERY telnet client user EVERY time they connect
   with a 10 second pause afterwards.

 - lib/ircII.servers is the list of servers allowed to be used
   by telnet client users.  Not only does this list provide the
   default server to be connected to, but users may not change
   to any server not on this list.

 - lib/telnet.bad_sites is the "shitlist" file.  It can contain
   comments (start with #), wildcarded strings that forbid any
   users from sites matching them to use this client (start with
   -), or sites which are 'anonymous' i.e. their site name will
   not appear in their IRCNAME string (start with +).

 - lib/telnet.denial_msg is a file which is displayed to users
   who are forbidden to use the telnet client due to matching
   an entry in the "shitlist" file.

 - bin/irctelnet.log is a log of all connections, terminations,
   terminals requested and emulated, and sites that connect and
   are granted "anonymous" status (by virtue of a match of the
   anonymous entry in the "shitlist" file).  All entries are
   timestamped.  THIS FILE IS ONLY GENERATED IF YOU RUN
   IRCTELNETD USING STARTTELNETIRC.  Otherwise, this information
   is dumped to standard out.

 - bin/starttelnetirc is a script to easily run irctelnetd in
   the background.  This is ideal to put on a cron job to make
   sure irctelnetd always stays running.


That's all there is to it.  Email me with questions/problems, etc.

Hendrix -=- jimi@rahul.net
