From: sources@anomaly.sbs.risc.net
Subject: v01i305 - ircII-2.2 - Internet Relay Chat Client, v2.2 - Part 01/16
Reply-To: sources@anomaly.sbs.risc.net
Organization: Small Business Systems, Incorporated, Smithfield, RI 02917
Date: Mon, 04 Jan 1993 23:20:19 GMT
Followup-To: biz.sco.general

Submitted-by: mknewman@blkbox.com (Mark Newman)
Posting-number: Volume 01, Issue 305
Archive-name: ircII-2.2/part.01
Environment: SCO UNIX v3.2.4+, SCO ODT 2.0+

#!/bin/sh
# This is a shell archive (shar 3.32)
# made 01/03/1993 16:18 UTC by root@anomaly
# Source directory /usr/adm/root/irc/ircII
#
# existing files WILL be overwritten
# This format requires very little intelligence at unshar time.
# "echo" and "sed" will be needed.
#
# This is part 1 of a multipart archive                                    
# do not concatenate these parts, unpack them in order with /bin/sh        
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    661 -rwx------ Copyright
#    728 -rwx------ Expressions
#   1517 -rwx------ INSTALL
#   1179 -rwx------ Ircserv
#   7939 -rwx------ Makefile
#    159 -rwx------ README
#    795 -rwx------ Rules
#   1785 -rwx------ SecureIRC
#  30605 -rwx------ UPDATES
#   7073 -rwx------ config.h.lynx
#    546 -rwx------ example_menu
#   5013 -rwx------ man/ircII.1
#   1616 -rw------- script/2.7script
#   1982 -rw------- script/action
#    963 -rw------- script/alias
#   1012 -rw------- script/basical
#   5732 -rw------- script/bigcheese
#   2342 -rw------- script/brc
#    671 -rw------- script/columns
#   1331 -rw------- script/commander
#    187 -rw------- script/cursor
#    324 -rw------- script/deutsch
#    171 -rw------- script/disc
#    423 -rw------- script/english
#    419 -rw------- script/events
#    360 -rw------- script/extensions
#   2152 -rw------- script/finger
#    332 -rw------- script/finger.who
#    116 -rw------- script/flood
#   6219 -rw------- script/fnet
#    276 -rw------- script/global
#    285 -rw------- script/ircIIhelp
#     76 -rw------- script/ircrc
#   1872 -rw------- script/kickmenu
#    643 -rw------- script/killpath
#   1222 -rw------- script/kpstat
#    198 -rw------- script/list
#    165 -rw------- script/local
#    313 -rw------- script/log
#    270 -rw------- script/msg
#   1657 -rw------- script/mudlike
#    229 -rw------- script/nemesis
#   3007 -rw------- script/netsplit
#    311 -rw------- script/nicks
#    676 -rw------- script/oper
#   1376 -rw------- script/ping
#    167 -rw------- script/prefix
#   1682 -rw------- script/recursion
#    106 -rw------- script/repeat
#    641 -rw------- script/service
#    757 -rw------- script/shell
#    582 -rw------- script/silent
#    680 -rw------- script/time
#   2223 -rw------- script/traces
#   7780 -rw------- script/troy
#    285 -rw------- script/version
#    309 -rw------- script/voice
#   1333 -rw------- script/wallopstat
#   1676 -rw------- script/whowas
#    397 -rw------- script/window
#  12814 -rwx------ source/HISTORY
#   5418 -rwx------ source/Makefile.proto
#   1177 -rwx------ source/TODO
#  50548 -rwx------ source/alias.c
#    706 -rwx------ source/alias.h
#   7378 -rwx------ source/config.h
#    473 -rwx------ source/count.c
#   7113 -rwx------ source/crypt.c
#    295 -rwx------ source/crypt.h
#  13147 -rwx------ source/ctcp.c
#    797 -rwx------ source/ctcp.h
#  30611 -rwx------ source/dcc.c
#   1432 -rwx------ source/dcc.h
#   7370 -rwx------ source/digraph.inc
#  54802 -rwx------ source/edit.c
#    260 -rwx------ source/edit.h
#  24538 -rwx------ source/exec.c
#    428 -rwx------ source/exec.h
#   3084 -rwx------ source/file.c
#   2779 -rwx------ source/flood.c
#    207 -rwx------ source/flood.h
#   5798 -rwx------ source/funny.c
#    230 -rwx------ source/funny.h
#  10287 -rwx------ source/help.c
#  11914 -rwx------ source/history.c
#    381 -rwx------ source/history.h
#   3517 -rwx------ source/hold.c
#    575 -rwx------ source/hold.h
#  20016 -rwx------ source/hook.c
#   1457 -rwx------ source/hook.h.proto
#   3902 -rwx------ source/if.c
#  10309 -rwx------ source/ignore.c
#    645 -rwx------ source/ignore.h
#  15241 -rwx------ source/input.c
#    456 -rwx------ source/input.h
#  19486 -rwx------ source/irc.c
#   5931 -rwx------ source/irc.h
#  22506 -rwx------ source/ircaux.c
#    564 -rwx------ source/ircaux.h
#   2924 -rwx------ source/ircflush.c
#   6947 -rwx------ source/ircserv.c
#  32755 -rwx------ source/keys.c
#    603 -rwx------ source/keys.h
#   7517 -rwx------ source/lastlog.c
#   1075 -rwx------ source/lastlog.h
#   4468 -rwx------ source/list.c
#    416 -rwx------ source/list.h
#   2692 -rwx------ source/log.c
#    256 -rwx------ source/log.h
#   5648 -rwx------ source/mail.c
#    214 -rwx------ source/mail.h
#    396 -rwx------ source/match.c
#   8297 -rwx------ source/menu.c
#    705 -rwx------ source/menu.h
#  14740 -rwx------ source/names.c
#    842 -rwx------ source/names.h
#   7247 -rwx------ source/newio.c
#   7033 -rwx------ source/notice.c
#   5046 -rwx------ source/notify.c
#    234 -rwx------ source/notify.h
#  12056 -rwx------ source/numbers.c
#    223 -rwx------ source/numbers.h
#   5449 -rwx------ source/output.c
#    332 -rwx------ source/output.h
#  21898 -rwx------ source/parse.c
#   1947 -rwx------ source/reg.c
#    224 -rwx------ source/reg.h
#   6212 -rwx------ source/scandir.c
#  32215 -rwx------ source/server.c
#   1163 -rwx------ source/server.h
#  22699 -rwx------ source/status.c
#    367 -rwx------ source/status.h
#   3171 -rwx------ source/talkd.h
#  15329 -rwx------ source/term.c
#   3077 -rwx------ source/term.h
#  10241 -rwx------ source/translat.c
#    908 -rwx------ source/translat.h
#  19305 -rwx------ source/vars.c
#   2960 -rwx------ source/vars.h.proto
#  28359 -rwx------ source/whois.c
#    849 -rwx------ source/whois.h
#  84121 -rwx------ source/window.c
#   5838 -rwx------ source/window.h
#    555 -rwx------ test-suid.c
#   2623 -rw------- translation/ASCII
#   2623 -rw------- translation/CP437
#   2623 -rw------- translation/CP850
#   2623 -rw------- translation/DANISH
#   2623 -rw------- translation/DEC_MCS
#   2623 -rw------- translation/DG_MCS
#   2623 -rw------- translation/DUTCH
#   2623 -rw------- translation/FINNISH
#   2623 -rw------- translation/FRENCH
#   2623 -rw------- translation/FRENCH_CANADIAN
#   2623 -rw------- translation/GERMAN
#   2623 -rw------- translation/HP_MCS
#   2623 -rw------- translation/IRV
#   2623 -rw------- translation/ITALIAN
#   2623 -rw------- translation/JIS
#   2623 -rw------- translation/MACINTOSH
#   2623 -rw------- translation/NEXT
#   2623 -rw------- translation/NORWEGIAN_1
#   2623 -rw------- translation/NORWEGIAN_2
#   2623 -rw------- translation/PORTUGUESE
#   2623 -rw------- translation/PORTUGUESE_COM
#   2623 -rw------- translation/SPANISH
#   2623 -rw------- translation/SWEDISH
#   2623 -rw------- translation/SWEDISH_NAMES
#   2623 -rw------- translation/SWEDISH_NAMES_COM
#   2623 -rw------- translation/SWISS
#   2623 -rw------- translation/UNITED_KINGDOM
#   2623 -rw------- translation/UNITED_KINGDOM_COM
#
if test -r shar3_seq_.tmp; then
	echo "Must unpack archives in sequence!"
	next=`cat shar3_seq_.tmp`; echo "Please unpack part $next next"
	exit 1
fi
# ============= Copyright ==============
echo "x - extracting Copyright (Text)"
sed 's/^X//' << 'SHAR_EOF' > Copyright &&
XIRC II is copyright (c) 1990 by Michael Sandrof.  You have the
Xright to copy, compile, and maintain this software.  You also
Xhave the right to make modifcations to this code for local use
Xonly.
X
XVersion 2.1.1 and beyond are Copyright 1991 Troy Rollo.
X
XOne module of the source code, scandir.c is copyright (c) 1983 by
Xthe Regents of the University of California, with modifications
Xby various contributors. All rights are reserved by the University
Xof California.  
X
XThis software is provided ``as is'' and without any express or
Ximplied warranties, including, without limitation, the implied
Xwarranties of merchantibility and fitness for a particular
Xpurpose.
SHAR_EOF
# ============= Expressions ==============
echo "x - extracting Expressions (Text)"
sed 's/^X//' << 'SHAR_EOF' > Expressions &&
XThe following is the parse tree for expressions such as  those
Xused in if, ${} and @.
X
X	NU_EXPR = NU_CONJ
X	NU_CONJ = NU_CONJ && NU_CONJ	|
X		  NU_CONJ || NU_CONJ	|
X		  NU_CONJ ^^ NU_CONJ	|
X		  NU_ASSN
X	NU_ASSN = varexp = NU_ASSN	|
X		  NU_COMP
X	NU_COMP = NU_COMP == NU_COMP	|
X		  NU_COMP != NU_COMP	|
X		  NU_COMP >  NU_COMP	|
X		  NU_COMP >= NU_COMP	|
X		  NU_COMP <  NU_COMP	|
X		  NU_COMP <= NU_COMP	|
X		  NU_ADD
X	NU_ADD  = NU_ADD + NU_ADD	|
X		  NU_ADD - NU_ADD	|
X		  NU_ADD ## NU_ADD	|
X		  NU_MULT
X	NU_MULT = NU_MULT * NU_MULT	|
X		  NU_MULT / NU_MULT	|
X		  NU_UNIT
X	NU_UNIT = token NUX_MODIF	|
X		 unaryop token		|
X		( NU_EXPR )		|
X		[ expression ] NUX_MODIF
X
X	NUX_MODIF = ( expression ) NUX_MODIF |
X		    [ expression ] NUX_MODIF
SHAR_EOF
# ============= INSTALL ==============
echo "x - extracting INSTALL (Text)"
sed 's/^X//' << 'SHAR_EOF' > INSTALL &&
X		     INSTALLATION INSTRUCTION FOR IRCII
X
X1.  Using your favorite editor, modify the config.h file to meet
X    your site specifications.  Instructions for doing this are
X    included in the config.h file.  
X
X2.  Again using your favorite editor, modify the Makefile to meet
X    your site specifications regarding program and help file
X    installation, etc.  Instructions are included in the Makefile.
X
X3.  Type "make install".  This will compile and install the program.
X    Then type "make installscript" and "make installtranslation" to
X    install the scripts and the character translation tables to
X    their definitive locations.
X
X4.  If you have the help documentation, put it into the ircII library
X    directory and type "make markhelps" (if the modes got lost).  
X
X5.  If you wish to install the ircserv program as well,
X    type "make installserv".
X
X6.  If you wish to install the ircflush program as well,
X    type "make installflush".
X    See the Makefile about using ircserv and ircflush.
X
X7.  If your ircII client behaves in a way you didn't want it to, it
X    might be related to the things it executes at startup, precisely
X    the script/global file, and the related script/local.
X    For information about the scripts read also the /HELP LOAD.
X
X8.  BigCheese is no longer on Internet (since June, 1991).
X    Therefore questions and comments should now be redirected to
X	Troy Rollo (troy@cbme.unsw.EDU.AU, Troy on IRC)
X    or to the ircII mailing list
X	irc@cmu.edu
X    or to the alt.irc newsgroup.
SHAR_EOF
# ============= Ircserv ==============
echo "x - extracting Ircserv (Text)"
sed 's/^X//' << 'SHAR_EOF' > Ircserv &&
Xircserv is part of this distribution.
XYou can set wether you want to install it within the Makefile,
Xhere's a little help in deciding:
X
XPros:
XIRCII will run as two separate processes, with ircserv responding to server
XPINGs.  This means you can stop IRCII (with ^Z) and not get disconnected 
Xfrom a server. It will buffer 4K of stuff before it blocks and PINGs
Xwill be missed.  If, for some reason, the ircserv program cannot be
Xstarted, IRCII will connect directly to the server without it
X(transparently to the user)
X
XCons:
XIt blocks beyond 4K of stuff.
XWhile being smaller than IRCII, it still takes up disk space.
XSince it runs as a separate process, it uses system resources while
Xrunning (although not much).
X
XNote: If you add #define NON_BLOCKING to ircserv.c, then ircserv will
Xnot block at all.  Rather, it will discard all info beyond the 4K.
XThis means it will never miss a PING.
XIt can, however, screw up certain things (such as NOTIFY) if some
Xof the return information is discarded.  Use this NON_BLOCKING at
Xyour own discretion 
X
XOperation of IRCII is identical either way.  Remember to do a 
X"make installserv" to compile and install ircserv if you are using it.
SHAR_EOF
# ============= Makefile ==============
echo "x - extracting Makefile (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile &&
X# IRC II - written by Michael Sandrof
X# Copyright (c) 1991 - All Rights Reserved
X
X# Full path and name of installed irc program
X# 'make install' will compile and install the program
XINSTALL_EXECUTABLE = /usr/lbin/irc
X
X# Full path of the directory where the ircII library resides
X# It should contain the script directory, the help
X# directory, if you want it, and the other files.
X# 'make installscript' will copy the scripts into it.
XIRCII_LIBRARY = /usr/lib/irc
X
X# Set the next line to the full path for installation of the ircserv program
X# if you wish to use it. 
XINSTALL_IRCSERV = /usr/lbin/ircserv
X
X# This little program is necessary to have an interactive shell
X# in a window of ircII. The 'shell' script uses it, so also update
X# the path in there, if you want to enable this.
XINSTALL_IRCFLUSH = /usr/lbin/ircflush
X
X# Uncomment the following if you want a secure IRC which binds to a
X# privileged port. This feature is completely useless in the current
X# IRC environment, but in the future some servers may use privileged
X# port systems to verify users connecting to them. The value of
X# PRIV_PORT determines the minimum port number to use.
X# If you modify these (including uncommenting them) you will need to
X# touch config.h
X#
X# If you are on a system where test-suid works, you can simply define
X# PP_DEFS to be PRIV_PORT_ULC and irc will change effective UID back
X# to a normal user immediately, and change to root when binding a port.
X# This feature is undocumented, but is known to work on Sun, MIPS and
X# Apollo (Cos we've tested them already).
X# PP_DEFS = -DPRIV_PORT=667
X# PP_OBJS = file.o
X# PP_DEFS = -DPRIV_PORT_ULC
X
X# Below are system specific setups.
X# If your system is not included in the lines below, do some experimenting
X# with the DEFINES and program code, then if you happen to make it work
X# properly, mail about the changes you had to make, include system type
X# and version, so it can be included into ircII distribution.
X
X# Note that if you are using a machine with a segmented architecture
X# (Xenix, AIX RT, some low end suns, 386BSD, linux and anything else
X# based on the Intel 80x86 range of chips) you will
X# need to compile in the large or huge memory model. This is not included
X# in the flags below, so you'll need to check the manual entry for cc
X# to find out and insert them below.
X
X# This is the default setup that should work for BSD and similar systems.
X#LIBS = -ltermcap
X#CC = cc
X#DEFINES = 
X
X# This is the setup for SCO Open Desktop 2.0 or SCO Unix 3.2.4
XLIBS = -ltermcap -lsocket
XCC = gcc
XDEFINES = -Dsco -D_AUX_SOURCE
X
X# For IBM RS6000 systems running AIX 3.1 or 3.2, the following will work
X# LIBS = -lcurses
X# CC = c89 -D_ALL_SOURCE
X
X# For IBM RTs running AIX 2.2.1, use the following:
X# LIBS = -lcurses
X# DEFINES = -D_RT -D_AUX_SOURCE -DBSD_INCLUDES
X
X# For AIX/370 V1.0 use:
X# LIBS = -lcurses
X# DEFINES = -D_BSD
X
X# Use the following set up for HPUX 8.0 systems
X# LIBS = -lcurses -lmalloc
X# DEFINES = -DHPUX
X
X# For HPUX 7.0 systems:
X# LIBS = -lcurses -lBSD -lPW
X# DEFINES = -DHPUX -DHPUX70
X
X# For Apollo systems (10.2 and upwards) use the following with BSD defaults:
X# DEFINES = -Asys,bsd4.3
X
X# Use one of the following for mips systems:
X# Choice 1, if your system has the wait3() call
X# DEFINES = -systype bsd43
X# Choice 2, if your system has the wait2() call
X# DEFINES = -systype bsd43 -Duse_wait2
X#
X# Or, if you only have sysv installed, use one of the following:
X# DEFINES = -DMIPS_SYSV
X# DEFINES = -DMIPS_SYSV -Duse_wait2
X
X
X# The BSD defaults should now work correctly with ULTRIX systems.
X
X# Use the following setup for SGI Irix systems:
X# LIBS = -lcurses -lPW -lbsd -lc
X# Use the following for SGI Irix systems running Yellow Pages
X# LIBS = -lsun -lcurses -lPW -lbsd -lc
X# DEFINES = -Dsgi -D_AUX_SOURCE -I/usr/include/bsd
X
X# Use the following for MUNIX systems:
X# LIBS = -lcurses -lresolv -lbsd -lc
X# DEFINES = -DMUNIX -D_AUX_SOURCE -I/usr/include/bsd
X
X# For the ISC22 system:
X# DEFINES = -DISC22 -D_AUX_SOURCE
X
X# For Tektronix XD88:
X# DEFINES = -DXD88 -D_AUX_SOURCE
X# LIBS = -ltermcap
X
X# For Dell System V Release 4
X# DEFINES= -DSVR4
X# LIBS= -lsocket -lnsl -lxtermcap
X# SHELL= /bin/sh
X
X# Use the following for sysV and termio systems:
X# DEFINES = -D_AUX_SOURCE
X
X## You probably don't need to change anything below this line
X
X# Full path of the directory for ircII help files.  
X# The help files are not within the source distribution, if you don't have
X# them and want them, check out your nearest ircII archive.
X# You may comment HELP_DIR, then the ircIIhelp service will be used.
X# If you don't comment it out and want to use the IRCIIHelp service anyway,
X# you must make sure that the directory doesn't exist.
XHELP_DIR = ${IRCII_LIBRARY}/help
X
X# Full path of the directory in which to copy the
X# IRCII scripts supplied with the code.  These scripts
X# may be loaded by using the LOAD command in IRCII.
XINSTALL_SCRIPT = ${IRCII_LIBRARY}/script
X
X# Default setting for IRC_PATH where irc will look for
X# its script files if the environment variable is undefined.
X# Usually, this should contain the same path as used for INSTALL_SCRIPT in
X# the Makefile, but it can contain multiple path elements
X# separated by colons. The path MUST lead to an existing directory,
X# because the 'global' script is expected to be found there.
XIRC_LOAD_PATH = .:~/.irc:${INSTALL_SCRIPT}
X
X# Path for TRANSLATION variable.
XTRANSLATION_PATH = ${IRCII_LIBRARY}/translation
X
X# Set this to -g if you want to be able to debug the client, otherwise
X# use -O to have the compiler do some optimization instead.
XCFLAGS = -O2
X
X## You shouldn't have to change anything below here
X
XRM = rm -f
XCP = cp -r
XINSTALL = cp
X
Xall: source/Makefile
X	cd source; make
X
Xsource/Makefile: source/Makefile.proto Makefile
X	@${RM} source/Makefile
X	sed -e 's;INSTALL_NAME_PROTO;${INSTALL_EXECUTABLE};'\
X	    -e 's;LIBS_PROTO;${LIBS};'\
X	    -e 's;CFLAGS_PROTO;${CFLAGS};'\
X	    -e 's;RM_PROTO;${RM};'\
X	    -e 's;CP_PROTO;${CP};'\
X	    -e 's;CC_PROTO;${CC};'\
X	    -e 's;DEFINES_PROTO;${DEFINES};'\
X	    -e 's;IRCLIB_PROTO;${IRCII_LIBRARY};'\
X	    -e 's;IRCPATH_PROTO;${IRC_LOAD_PATH};'\
X	    -e 's;INSTALL_PROTO;${INSTALL};'\
X	    -e 's;HELP_PROTO;${HELP_DIR};' \
X	    -e 's;INSTALL_IRCSERV_PROTO;${INSTALL_IRCSERV};'\
X	    -e 's;TRANSLATION_PROTO;${TRANSLATION_PATH};'\
X	    -e 's;PP_DEFS_PROTO;${PP_DEFS};'\
X	    -e 's;PP_OBJS_PROTO;${PP_OBJS};'\
X	    -e 's;PPS_DEFS_PROTO;${PPS_DEFS};'\
X	 	source/Makefile.proto > source/Makefile 
X
Xircserv: source/Makefile
X	cd source; make ircserv
X
Xircflush: source/ircflush.c
X	cd source; make ircflush
X
Xinstall: all
X	${INSTALL} source/irc ${INSTALL_EXECUTABLE}
X
Xinstallscript:
X	-mkdir ${INSTALL_SCRIPT}
X	chmod -x script/*
X	-cp ${INSTALL_SCRIPT}/local script
X	cp script/* ${INSTALL_SCRIPT}
X	chmod 644 ${INSTALL_SCRIPT}/*
X
Xinstalltranslation:
X	-mkdir ${TRANSLATION_PATH}
X	chmod -x translation/*
X	cp translation/* ${TRANSLATION_PATH}
X	chmod 644 ${INSTALL_SCRIPT}/*
X
Xinstallserv: ircserv
X	${INSTALL} source/ircserv ${INSTALL_IRCSERV}
X
Xinstallflush: ircflush
X	${INSTALL} source/ircflush ${INSTALL_IRCFLUSH}
X
Xinstallhelp:
X	@echo Help files are no more within this package, so I suppose
X	@echo they are already in ${HELP_DIR}, so I will start
X	@echo marking the operator-only help files, though correct
X	@echo unwrapping of the tar leaves the marks anyway.
X	make markhelps
X
Xmarkhelps:
X	chmod u+xs ${HELP_DIR}/CONNECT* 
X	chmod u+xs ${HELP_DIR}/DIE
X	chmod u+xs ${HELP_DIR}/KILL*
X	chmod u+xs ${HELP_DIR}/REHASH*
X	chmod u+xs ${HELP_DIR}/RESTART*
X	chmod u+xs ${HELP_DIR}/SQUIT*
X	chmod u+xs ${HELP_DIR}/WALL
X	chmod u+xs ${HELP_DIR}/NOTE/SAVE*
X	chmod u+xs ${HELP_DIR}/ON/WALLOP*
X
Xclean:
X	cd source; make clean
X
Xlint:
X	cd source; make lint
X
Xdist: clean
X	mv config.h ..
X	mv config.h.orig config.h
X	( PWD=`pwd`; VERSION_DIR=`basename $PWD`; cd ..; tar cf $VERSION_DIR.tar $VERSION_DIR; compress $VERSION_DIR.tar; mv $VERSION_DIR.tar.Z //mr_plod/usr/spool/ftp/pub )
X	mv config.h config.h.orig
X	mv ../config.h .
SHAR_EOF
# ============= README ==============
echo "x - extracting README (Text)"
sed 's/^X//' << 'SHAR_EOF' > README &&
XA new help file "/help NEWS" contains the changes in the latest
XircII versions in user-readable form. You might want to state this
Xin your ircII.motd.   -lynx
SHAR_EOF
# ============= Rules ==============
echo "x - extracting Rules (Text)"
sed 's/^X//' << 'SHAR_EOF' > Rules &&
X
X       THIS IS AN IMPORTANT NOTICE FOR IRC-ADMINISTRATORS AND OTHERS
X
XIn this version of ircII is included a helpfile called RULES.
XThe rules wher first published on operlist around 1990/91.
X
XThe rules are designed to prevent abusive behavior. So, in fact, they are
Xthere for your safety.
X
XIf you like anrachy, imediately delete the file.
XIf you like a better community, a safer place to be, a friendlier net,
Xplease make the rules your guideline on IRC.
X
X
XOve Ruben R Olsen
XIRC-ADMIN Bergen Edu College, Norway.
X
XEmail:        rubenro@viggo.blh.no
XDisclaimer:   I have nothing to do with the college in any matter, except for 
X	      administration of irc in Western Norway. I'm also coordinating 
X	      the Norwegian IRC-links.
X	      My oppinions, etc, are my own, not anyone that I know.
X
SHAR_EOF
# ============= SecureIRC ==============
echo "x - extracting SecureIRC (Text)"
sed 's/^X//' << 'SHAR_EOF' > SecureIRC &&
XThis version of IRCII supports the use of privileged ports. A modified
Xserver which only accepts connections from clients whose port number is
Xbelow 1024 can use this to ensure the integrity of the user name field
Xfrom the user@host pair.
X
XThe procedure for installing IRCII for privileged ports is slightly
Xdifferent. First, you should uncomment the PP_OBJS and PP_DEFS macros
Xin Makefile. Then touch config.h and make. The value for PRIV_PORT
Xspecified in PP_DEFS is the lower bound port IRCII should try to use.
XIn practice this value is unlikely to matter, provided it is below 1000.
X
XIf your system has the saved UID feature, you can use a more secure
Xversion of the privileged port code. See test-suid.c and Makefile for
Xdetails on this.
X
XOnce you have made IRCII, and installed it, you will need to do one of
Xtwo things:
X
X	1) If you are using ircserv, make the ircserv program owned by
X	   root, with a secure group ID. For example, you could create
X	   the group ID irc, and have ircserv's group be irc.
X
X	   Change the mode of ircserv so that nobody other than a member
X	   of that group (or root) can execute it. Then make irc setgid
X	   to that group.
X
X	   eg:  chown root.irc ircserv
X		chmod 4710 ircserv
X		chgrp irc irc
X		chmod 2711 irc
X
X	   If there is a chance that users may be unable to execute the
X	   ircserv process due to processes being exhausted, you can make
X	   irc setuid->root too.
X
X	2) If you are not using ircserv, you will need to install irc
X	   setuid->root.
X
X	   eg:  chown root irc
X		chmod 4711 irc
X
XNote: The Implementation with the ircserv process can be proven to be
X	secure trivially. This is not the case with the non ircserv
X	version, although the potential waeknesses have been carefully
X	analysed, and to the best of my knowledge, none exist.
SHAR_EOF
# ============= UPDATES ==============
echo "x - extracting UPDATES (Text)"
sed 's/^X//' << 'SHAR_EOF' > UPDATES &&
X2.2pre7
X	Meta4 is now sticky. That is, Meta4-C-D-E-F-G invokes the
X	meta4 versions of C, D, E, F and G. This effect lasts until
X	meta4 is invoked again. Additionally, the Meta4 characters
X	^h, SPACE, h, i, j, k, x, H, I, J, K, L and X have been
X	bound in such a way that BIND ^[ META4_CHARACTER now
X	gives a vi editing mode.
X
X	Bugs in complex '@' expressions fixed.
X
X	Thu Jun 11 09:48:47 1992  Charles Hannum  (mycroft@ai.mit.edu):
X
X	* Makefile: Change RS/6000 support.
X
X	* config.h (DEFAULT_STATUS_CHANNEL): Delete duplicate definition.
X
X	* script/action: Remove `on's.
X
X	* script/bigcheese: Convert to 2.2pre6 syntax.
X	script/finger.who, script/fnet, script/killpath: Likewise.
X	script/kpstat, script/log, script/nicks, script/repeat: Likewise.
X	script/shell, script/voice: Likewise.
X
X	* script/version: Update version number.
X	script/netsplit: Rewrite to handle multiple splits.
X	script/brc: Fix typo.
X
X	* source/alias.c: Change function prototypes to match definitions.
X	source/ctcp.c, source/edit.c, source/status.c: Likewise.
X	source/term.c, source/translat.c, source/vars.c: Likewise.
X	source/window.c: Likewise.
X
X	* source/edit.c: Put comment delimiters around text after #endif.
X	source/help.c, source/hold.h, source/irc.h, source/ircaux.c: Likewise.
X	source/lastlog.h, source/term.h: Likewise.
X
X	* source/exec.c: Add support for AIX 3.
X	source/help.c, source/irc.h, source/ircserv.c: Likewise.
X	source/log.c, source/newio.c, source/scandir.c: Likewise.
X	* source/ircaux.c: Rename _RS6000 to _IBMR2.
X	source/status.c: Likewise.
X	* source/term.c: Remove unnecessary code for AIX 3.
X
X	* source/vars.c: Replace NULLs with 0s in integer context.
X
X	* source/status.c (convert_sub_format): Make bletch an array to
X	prevent being put in readonly storage.
X	(status_channel): Use format string even if *private*.
X
X	* source/notice.c (parse_server_notice): Don't call
X	reconnect_all_channels and reinstate_user_modes if first connect
X	(phone bug).
X
X	* source/menu.c: Make sure menu cursor doesn't get redrawn if menu
X	disappears.
X
X	* source/exec.c: Make sure messages get redirected after EXEC output.
X
X	* source/edit.c (evalcmd): Fix EVAL when subargs == NULL.
X	source/if.c (ifcmd, whilecmd, foreach): Likewise for IF, WHILE,
X	and FOREACH.
X
X	* source/if.c (whilecmd): Copy exp on every iteration, as parse_inline
X	destroys it.
X
X	* source/irc.c: Update version number.
X
X	* source/dcc.c: Include arpa/inet.h for prototypes.
X
X	* script/ping, script/whowas: New scripts.
X2.2pre6
X	WARNING. 2.2pre6 will almost certainly require changes
X	to your .ircrc and script files due to changes in the
X	parsing. The intention at his point is to keep the new
X	syntax forever. That is, unless there's something I
X	have missed, there will be no further script breaking
X	changes.
X
X	DISPLAY now defaults to OFF in scripts.
X
X	Two new meta keys have been added. Meta3 is bound by
X	default to META1-[, and Meta4 is left unbound.
X
X	DCC SEND now checks that a file exists before sending
X	the request. Memory allocation bugs when using DCC
X	file transfers with ~ pathnames fixed.
X
X	If you have experienced corrupted output from ircII,
X	this should be fixed.
X
X	Several display bugs, including a memory leak related
X	to using windows have been fixed.
X
X	Missed PINGs when in the help pager fixed.
X
X	A new command, EVAL, has been added. EVAL causes
X	its arguments to be passed through variable substitution
X	and executed.
X
X	Alias substitution is no longer performed in scripts,
X	regardless of the setting of INPUT_ALIASES. To force alias
X	substitution, use EVAL.
X
X	A command beginning with '@' is taken to be an
X	alias expression as would be normally parsed
X	from within ${}. The expression is substituted and
X	the substituted value discarded.
X
X	The script loading path is now accessible as the SET
X	variable, LOAD_PATH. Additionally, if you are unsure
X	as to which directory a script being loaded is in,
X	the /WHICH command will display the full path to a
X	script. eg. /which global shouls give something on all
X	systems.
X
X	Bugs in Menus which caused core dumps have been fixed.
X
X	Bug in DCC which caused incoming DCC messages not to be
X	directed to window level DCC fixed.
X
X	Bug with +s channels and /names fixed.
X
X	Connections to servers on UNIX domain sockets are now
X	supported.
X
X	Aliases can now be recursive up to a maximum level
X	as specified in the variable MAX_RECURSIONS.
X
X	The inline variable parser now substitutes \n, \r, \0
X	and \p too their equivalents in the CTRL-P convention.
X
X	Having ! as the first character for the INDEX function
X	no longer causes just unescaped characters to be matched.
X	It is now a normal character in this context.
X
X	The $%FUNCTION syntax is no longer supported. You can
X	still use functions - just remove the '%'.
X
X	The parser used when INPUT_ALIASES is on has been changed
X	again. Text between brackets (...) and {...} is no longer
X	subject to alias expansion, unless the opening bracket is
X	escaped (ie... \( or \{ ). This affects alii and input when
X	INPUT_ALIASES is on.
X
X	Additionally, You can return to full alias substitution
X	within ${...} by enclosing the substitution text in
X	[...]. Thus  if $0 == test, and $bear == black
X		${[$0]} expands to "test"
X		${[$bear]} expands to "black"
X		${bear} also expands to "black"
X		${ bear == [black] }  expands to "1",
X		${ [$0] == [test] ) expands to "1"
X		${ [$0] == [black] ) expands to "0"
X		${ [$0](this) } expands to the return value of $test(this)
X
X	There is a new form for the if command. This is:
X		if (expr) {then_commands} {else_commands}
X	Note that because the expression, the then_commands
X	and the else_commands are between brackets, they are
X	not expanded in alias expansion. This is taken care of
X	in the if statement itself. The expression is treated
X	as if it were enclosed in ${...}. Thus all the comparisons,
X	groupings, arithmetic and boolean operations that a
X	available in ${...} can be used in the expression.
X	Also note that you can have more than one command in
X	each of the then and else parts of the condition.
X
X	The result is that what used to look like this:
X
X	on ^send_public * if "$^!^=^>^<C=$^!^=^>^<0" \
X		"echo $%format(11 <$N>) $^"1-" \
X		"echo $%format(10 <$N):$^"0> $^"1-"
X
X	can (and must) now be expressed like this:
X
X	on ^send_public * if ( C == [$0] ) \
X			{ echo $format(11 <$N> $1- } \
X			{ echo $format(10 <$N):$0> $1- }
X
X	Note that this means there is no longer any need for using the
X	^ escaping, and this may disappear in a later version unless
X	there are strong objections.
X
X	The same thing has happened to while and foreach, which now
X	have the syntax:
X		WHILE (expr) {commands}
X	AND
X		FOREACH structure index {commands}
X
X	The effect of this on WHILE and FOREACH is that you no longer
X	need to double up occurrences of '$'. You can still get this
X	effect if you wish by escaping the leading bracket in the
X	appropriate expression. Additionally, both while and foreach
X	can now be recursive. Thus the following works as expected:
X
X		assign a.1.1 one one
X		assign a.1.2 one two
X		assign a.2.1 two one
X		assign a.2.2 two two
X		alias fe
X		{
X			foreach a i
X			{
X				foreach a.$i j
X				{
X					echo $i $j $a[$i][$j]
X				}
X			}
X		}
X
X	THE OLD SYNTAX FOR IF, WHILE AND FOREACH IS NO LONGER SUPPORTED.
X
X	In scripts, lines beginning with '{' and containing other text
X	are joined on to the previous line with one space placed between
X	the two lines, thus the above example could have been written as:
X
X	on ^send_public * if ( C == [$0] )
X			{ echo $format(11 <$N> $1- }
X			{ echo $format(10 <$N):$0> $1- }
X
X	Additionally, the {..} syntax for grouping within scripts
X	can now be nested. Nested {...} pairs must have the brackets
X	placed on their own line, and the brackets are included in the
X	resulting text. Thus the following is equivalent to the above:
X
X	on ^send_public * if ( C == [$0] )
X			{
X				 echo $format(11 <$N> $1-
X			}
X			{
X				echo $format(10 <$N):$0> $1-
X			}
X
X	Or, for a little more verbosity:
X
X	on ^send_public * if ( C == [$0] )
X			{
X				echo Current Channel:
X				echo $format(11 <$N> $1-
X			}
X			{
X				echo Another Channel:
X				echo $format(10 <$N):$0> $1-
X			}
X
X2.2pre5
X	Bug in "Password" prompt for server passwords fixed.
X
X	Bug in WINDOW REFNUM fixed.
X
X	Bug in ON DCC_CHAT which prevented interaction with
X	the server fixed.
X
X	Bug which caused +w'd non-opers to see their own WALLOPs
X	twice fixed.
X
X	Additional operators have been added to the ${...}
X	expresions. They are the equality and inequality
X	operators (==, !=, >, >=, <, <=), the unary NOT
X	operator (!), and the conjugation operators (&&, ||, ^^).
X	These take 0 as false and any other number as true,
X	and return 1 as true and 0 as false.
X
X	On top of these are the assignment operator (=) and the
X	string concatenation operator (##). The assignment operator
X	means that the following now makess sense, and causes the value
X	of first_name and last_name to be concatenated with a space
X	inserted between them, and the value assigned to full_name.
X
X		@ full_name = first_name ## [ ] ## last_name
X
X	The following is also possible:
X
X		@ a = b * (c + d)
X
X	A new variable has been added for script developers.
X	The DEBUG variable enables three types of debugging
X	output dependant on the settings of various bits.
X		bit	value	purpose
X		 0	  1	Display all commands executed
X		 1	  2	Display all alias substitutions made
X		 2	  4	Display all function calls and return values
X
X	More changes to parsing have occured. Firstly, there
X	is no longer any '\' substitution on input. Thus, when
X	you type text to a channel, in a /msg or elsewhere, it
X	comes out exactly as you type it.
X
X	On the other hand, '\' processing does exist anywhere
X	that alias expansion occurs. The result is that if you
X	have INPUT_ALIASES ON, you won't notice the difference.
X	Also, aliases and ons still get the '\' substitution
X	performed on them. All \c pairs where c is any character
X	are collapsed to just 'c' after all parsing has been done,
X	with the exception of ", !, =, < and >, which are
X	required by if and while. This shouldn't be the case
X	for much longer.
X
X	Function and array index expansion now only observes
X	unescaped bracket delimiters. Thus $%index(\) abc\)def)
X	returns 3.
X
X	Finally, the '%' is no longer needed for functions.
X	Thus you the above example is the same as
X	$index(\) abc\)def)
X
X	The net result of all the changes to parsing in this
X	version should be to make both command entry and alias
X	construction much more intuitive.
X
X	A new function, TDIFF, has been implemented.
X	TDIFF takes as its argument a time interval in seconds
X	and returns it as the english representation of
X	that number in the form:
X
X		dd days hh hours mm minutes ss seconds
X
X	omiting any zero values, unless all values are zero,
X	in which case the seconds field is returned.
X
X	Bugs in dumb mode fixed.
X
X	The parsing of ${} expressions has been changed. When
X	mathematical expressions are being used, order of
X	operations is respected and brackets are recognised
X	and treated correctly. Additionally, functions can
X	be referenced (without needing the % qualifier), and
X	functions and aliases can be mixed to give versatility.
X	This may break some numeric expressions, but will make
X	a lot more a whole lot more legible and intuitive. For
X	example, the following:
X
X		${3*(INDEX(x abcxdef)+2)}
X
X	Yields 3*(3+2) = 15
X	or, if you have an alias:
X
X		ALIAS TEST echo ${INDEX(x $0)*5}
X
X	and then type:
X
X		/TEST abcxdef
X
X	you will get back 15
X
X	Then, if you have a set of functions, A.1, A.2, A.3,
X	and the variable IND is set to 2, then ${A[$IND]()}
X	will resolve to an invocation of A.2 as a function.
X
X	If you have a function, F, and a pair of arrays A
X	and B, each with elements numbered 1-10, and F returns
X	either A for 1 and B for 2, then the following:
X
X		${F(2)[5]}
X
X	returns element 5 from array B.
X	Because order of operations is now respected, both
X	${3*2+5} and ${5+2*3} return 11.
X
X2.2pre4
X	/WHO * now results in failure if you are not on a channel.
X
X	Behaviour of positioning when menus are being used has been
X	corrected. There's the possibility that I broke something
X	else while doing it though.
X
X	The worst of the memory leaks has been fixed. There are
X	still some memory leaks apparently present. If you compile
X	with ALLOC_DEBUG defined, then when the memory tracking
X	table gets full (indicating a leak), IRCII will abort,
X	generating a debug.log which lists all allocated blocks
X	with their sizes and contents in ASCII. This should
X	prove helpful in tracking leaks.
X
X	The slosh (\) no longer quotes characters which have no
X	special meaning, thus allowing you to enter a '\' in the
X	text without doubling it up. Additionally, The \n sequence
X	no longer works. Use ';' in aliases instead, and quote the
X	CR or NL character to get the same effect interactively
X	(ie. ^Q^J or similar).
X
X	Fixes to the multitude of bugs in pre3.
X
X2.2pre3
X	If the environment variable "MAIL" is set, IRCII now uses
X	it to determine which file to check for mail.
X
X	The VERBOSE_CTCP variable has been fixed.
X
X	A new function, CONNECT(), gives access to TCP sockets
X	at the application level. The arguments are the destination
X	host and port number, and the return value is the
X	file descriptor (fd) associated with that socket.
X	A null file descriptor indicates that the host could
X	not be resolved, and a negative descriptor indicates
X	that an error occured in connecting.
X
X	To test this facility, create a connection to the
X	echo service on some machine with:
X
X		/alias socktest echo $%connect(host 7)
X
X	Which will echo the file descriptor.
X	Then send messages to it with:
X
X		/dcc raw fd host message
X
X	These will be echoed back at you by the remote host.
X	Incoming messages can be intercepted with ON DCC_RAW,
X	which has the following formats:
X
X		fd host D data
X		fd host C
X		fd host N port
X		fd host E port
X
X	The D message indicated incoming data.
X	The C message indicates that the socket has been closed.
X	The N message indicates that a socket listening on the
X	specified port has accepted a connection. fd in this case
X	is the file descriptor for the new connection.
X	The E message is generated when a CONNECT() results in a
X	successful connection.
X
X	The LISTEN() function creates a listening socket. It takes
X	a single argument - the port number on which to listen. If
X	this is zero, then a port number is assigned. The return
X	value is the port number on which the socket is listening
X	for connections. A port number below 1025 results in an
X	error.
X
X	Conventions to be used for the socket access:
X
X		Scripts using sockets should never use the
X		serial number 0 in their hooks. As their first
X		act before using the DCC_RAW hooks, they should
X		set:
X
X		ON ^DCC RAW * #
X
X		To ensure that all raw DCC sockets produce no
X		output.
X
X		A new set of hooks should be created for each
X		active socket at a chosen serial number. One
X		must always exist to detect the close message,
X		and as its last act must remove all the hooks
X		for that file descriptor.
X	
X	
X	You can now "send" a message to a command. For example,
X		/msg /echo this is a test
X	is the same as
X		/echo this is a test.
X	The primary use of this is to allow a /QUERY of a command.
X	Thus if you /query /echo, everything you type to the
X	current window will simply be echoed back, and if you
X	/query /exec, you can use IRCII as a shell. Note that
X	when querying a command, you may need to use XECHO -WINDOW
X	to ensure output goes to the right place.
X
X	CTCP UTC has been added. This is primarily for robots
X	to send date and time information to users and have it
X	displayed in local time. The format of the UTC
X	CTCP is:
X		UTC number
X	where number is the ASCII representation of the 32 bit
X	integer representing the time as is used on UNIX machines.
X	When IRCII receives this CTCP, it replaces the text of
X	the local time expressed in the local language back into
X	the original message. Thus if you send the following:
X
X		/NOTICE nick The time is ^AUTC 702777074^A
X
X	The user might see:
X
X		-yournick- The time is Thu Apr  9 09:51:14 1992
X
X	(if their timezone is Australian Eastern Standard Time).
X
X	Menus have been added. The menus are totally user
X	configurable and a test menu has been provided in
X	the top level directory of the IRCII source distribution.
X	To use this menu, copy it to your home directory,
X	run IRC, and to the following:
X
X		/MLOAD test
X		/SET menu Main Menu
X
X	Control-R is bound to ENTER_MENU, and while in the menu
X	you can use vi-like keys or EMACS-like keys to move
X	through the options, and either '.' or SPACE to select
X	an option. The format of the menu file is as follows
X
X	A line beginning with a '#' represents a comment.
X	Blank lines are ignored.
X	A line beginning with the word "MENU" starts a new menu
X	and gives it a name.
X	A line beginning with the word "OPTION" adds a new option
X	to the menu, gives it a name and describes what it does.
X
X	For more information, see the demonstration menu shipped
X	with the sources.
X
X	Bug which cleared the input line when calling WAIT from
X	ON TIMER fixed.
X
X	Bug which left channel names from a previous connection
X	in the channel list even if they could not be rejoined
X	fixed.
X
X	User modes are now restored after a disconnect/reconnect.
X
X	Bug which caused the scrollback buffer to duplicate messages
X	when HOLD_MODE is on fixed.
X
X	USERHOST is now used in place of WHOIS to retrieve IRC-Op
X	information on WALLOPing users and in the case of 2.6.2
X	servers, user@host information for IGNORE. This means
X	that there are now three commands going through the WHOIS
X	queue - WHOIS, ISON and USERHOST. It is not a good idea
X	to /quote these, as you will be likely to corrupt the
X	WHOIS queue. USERHOST can now be issued with /HOST and
X	/USERHOST
X
X	It is now possible to have more than one ON hook executed for
X	each event triggering a hook. This has been done by adding a
X	new serial number concept to the ON command. Each ON hook has
X	a serial number attached. Serial numbers can be any number
X	from -maxint to maxint, with the default being 0.
X
X	When an event triggers a hook, IRCII now goes through the ON
X	hooks added for that event, and for each serial number used
X	by ON hooks in that hook type, finds the best match out of those
X	ON hooks which have that serial number and executes that ON
X	hook. The hooks are executed in order of serial number. Thus
X	if you set up the following set of MSG hooks.
X
X		ON #^MSG -666 * echo Message coming:
X		ON ^MSG * echo Message from $0: $1-
X		ON #^MSG 666 * echo I got one, I got one!
X		ON #^MSG 666 WiZ echo WiZ hath spoken
X
X	will cause the following to appear when you receive a message:
X
X		Message coming:
X		Message from nick: text
X		I got one, I got one!
X
X	And the following if you receive a message from WiZ:
X
X		Message coming:
X		Message from WiZ: text
X		WiZ hath spoken
X
X	The default serial number is 0, and the serial numbers are always
X	executed in order, starting with the lowest, and ending with the
X	highest.
X
X	Although the '^' modifier can be used with any serial number,
X	it will only suppress the decault action if used with serial
X	number 0. Thus if the only message hook you have is:
X
X		ON #^MSG -666 * echo Incoming:
X
X	You will see the following when you receive a message:
X
X		Incoming:
X		*nick* text
X
X	It is advisable to place any ON hooks which do not suppress the
X	default action in a serial number other than 0. In particular,
X	TIMER hooks, which are generally not intended to exclude other
X	TIMER hooks, should be placed at different serial numbers wherever
X	possible, and never on 0 (since 0 is the most likely place to
X	get a clash if anybody does use it).
X	
X	The # modifier (bind to current server) for ON commands has been
X	changed to '&'.
X
X	Fixed display bug with reverse and bold modes which caused
X	these modes to be turned off if a line wrapped. Also fixed
X	NOTIFY and LINKS problems.
X
X	The bug in user mode processing when a MODE command makes no
X	actual changes to the user mode has been fixed.
X
X	A new status line variable, %B, gives the number of lines
X	in the hold buffer for the current window. Its format
X	is controlled by the STATUS_HOLD_LINES variable. %B is only
X	updates once for every ten lines.
X
X	New status line variable, %# added. This returns the current
X	user mode. Its format is controlled by the STATUS_UMODE
X	variable.
X
X	The behaviour of FLUSH when HOLD_MODE is on has changed.
X	it now clears the hold buffer for the current window before
X	flushing further output from the server. The result is that
X	with HOLD_MODE on it is now impossible to get into a
X	situation where you are being flooded by server output
X	with no hope of reprieve.
X
X2.2pre2
X	^G bug fixed. A couple of small things cleaned up.
X
X2.2pre1
X	Note that there have been several new variables added in
X	this version, so old config.h files won't work. Also the
X	IRCIIhelp service is being regionalised. You should set
X	HELP_SERVICE to the nearest IRCII help service in config.h
X
X	Three new BIND functions have been implimented -
X	SCROLL_BACKWARD (bound by default to ESC-p), SCROLL_FORWARD
X	(bound by default to ESC-n), and SCROLL_END (bound by
X	default to ESC-e). These allow you to scroll through the
X	output stored in LASTLOG without having to use the
X	LASTLOG command. SCROLL_BACKWARD causes IRCII to scroll
X	half a window of LASTLOG data on to the screen, pushing
X	whatever is in the window towards the bottom. ESC-p
X	reverses this, thus looking at newer parts of the LASTLOG
X	history. ESC-e exits this scrollback buffer facility
X	at any time. This facility is probably best used with
X	HOLD_MODE set to ON, and requires SCROLL to be set to ON.
X	If you use this facility with HOLD_MODE off, then when you
X	leave the scrollback buffer, either by SCROLL_FORWARDing
X	to the end of it or SCROLL_ENDing, all text that has been
X	accumulated will be printed. If you have HOLD_MODE on,
X	the window will be held until you manually unhold it.
X
X	Provision has been made for memory allocation debugging
X	for developers. Add -DALLOC_DEBUG to the CFLAGS, and
X	IRCII will abort (generating a core dump) should memory
X	be freed which was never allocated. Additionally, a
X	dump will be made showing the locations of all allocated
X	memory with the two preceding long integers in memory.
X	Additionally, SEGV will be trapped and will generate
X	a similar log, with the addition that if you are using
X	an IBM RS6000 it will dump a heap walk. People on other
X	platforms will need to either add heap walk code for
X	those systems or manually walk the heap using the
X	debugging information. The dump is stored in debug.log
X
X	A new XECHO flag, -WINDOW, has been implimented. Thus:
X		XECHO -WINDOW 1
X	always sends output to window 1, and
X		XECHO -WINDOW JUNK
X	always sends output to the window named "junk". If the
X	window does not exist, the -WINDOW flag has no effect,
X	except to cancel any earlier -WINDOW flag.
X
X	Two new modifiers have been added to /ON. If the first
X	character of the first argument (the hook name or numeric
X	number) is '#' or '@', the ON only affects things relating
X	to the current server. Additionally, if it is '@', and there
X	is no match for things in the list of ONs applying to the
X	current server, it will not resort to the default list.
X	[Changed in pre3]
X
X	WHO -LUSERS (returns only non-operators) and
X	WHO -NICK <nickname> (returns only people matching the
X	nickname argument) have been implimented.
X
X	A new variable, DCC_BLOCK_SIZE controls the size of
X	blocks sent when sending files using DCC SEND.
X	The default is normally 512. Increasing this number
X	increases network efficiency. Decreasing this number
X	slows down the transfer, but also decreases the chances
X	of the transfer being aborted over bad links.
X
X	Use of real estate when SCROLL is ON has been improved.
X	There is no longer a blank line between the text and
X	the status bar. This takes a little getting used to,
X	as now the screen scrolls before a line is printed
X	rather than after.
X
X	You can now include text modification characters
X	(^B, ^V, ^_ and ^O) in STATUS_FORMAT. If you change
X	the format at the start of STATUS_FORMAT, you will
X	have to do it again after any %C or %U, as these
X	both reset it to reverse video.
X
X	You can no longer abbreviate QUIT, SIGNOFF, BYE or EXIT
X	in NOVICE mode.
X
X	All restrictions on IGNORE by user@host removed.
X
X	Internals given a decent reworking. There could be bugs here.
X	You should now never see ircd's colons marking the last
X	argument.
X
X	Added two new wildcards to the pattern matching system.
X	'%' matches any sequence of characters except a space.
X	'?' matches any single character.
X
X	International character set support added. Translation
X	tables are supplied for various terminal types. To activate
X	the appropriate character set, /SET TRANSLATION charset_name
X	eg. For an IBM PC set up for US English (Code page 437),
X		/SET TRANSLATION CP437
X	The translation tables assume that text transmitted on the
X	servers adheres to ISO 8859/1. If your terminal understands
X	ISO8859/1, set TRANSLATION to LATIN_1. The default is ASCII,
X	due to the fact that nothing can be safelt assumed about any
X	terminal.
X
X	Bug in /set history 1 fixed
X
X	Bug with redirecting to yourself fixed. It is now illegal
X	to redirect to yourself.
X
X	$P (Chanop status variable) fixed, and a new status line
X	substitution, %@, which subsitutes to STATUS_CHANOP if
X	you are chanop on the channel shown on the status bar.
X
X	$~ now substitutes to the last word on a line.
X
X	New functions:
X
X	ISCHANNEL(word)		Returns 1 if word is a valid
X				channel name.
X	ISCHANOP(nick channel)	Returns 1 if nick is a chanop
X				on the given channel.
X	WORD(number wordlist)	Returns the specified word from
X				wordlist. The first word is
X				numbered 0.
X	WINNUM()		Returns the current window number.
X				this is always the window which is
X				indicated by STATUS_WINDOW.
X	WINNAM()		Returns the current window name.
X				this is always the window which is
X				indicated by STATUS_WINDOW.
X				If the window has no name, it returns
X				nothing.
X
X	INVERSE_VIDEO variable and beyond fixed.
X
X	A new character attribute, bold, has been added. This
X	is enabled and disabled with ^_. Disabling bold has
X	the side effect of disabling inverse and underline
X	without recording it internally. You should allow for
X	this when using bold text. Bold text can be enabled
X	and disabled with the BOLD_VIDEO variable.
X
X	The status line problems with attribute characters
X	have been fixed. You can now include attribute characters
X	in the status line and they will take effect. One
X	application of this is to change the status bar from
X	inverse text to bold or underlined by including ^_ or
X	^V at the start of STATUS_FORMAT.
X
X	You can now refer to the elements of structures
X	(normally Structure.Element) as Structure[Element].
X	When you do this, Element is evaluated as an expression
X	before it is appended to Structure. Thus if A has the
X	value "TEST", and there is a variable "B.TEST" with the
X	value "Message":
X		echo $B[$A]
X	yields:
X		Message
X	These can be repeated, as in:
X		$MATRIX[0][0]
X	which becomes "$MATRIX.0.0". The result is a pseudo-array
X	effect.
X
X	New command, FOREACH has been added. The format is
X		FOREACH structure variable command
X	This causes command to be executed once for each
X	element in the named structure, with variable
X	substituted to the name of the element. Thus
X	if you have assigned:
X		/ASSIGN A.1 ONE
X		/ASSIGN A.2 TWO
X		/ASSIGN A.3 THREE
X		/ASSIGN A.4 FOUR
X		/ASSIGN A.5 FIVE
X	and have an alias:
X		/ALIAS SHOWA FOREACH a i ECHO $$i
X	and type
X		/SHOWA
X	The output will be:
X		1
X		2
X		3
X		4
X		5
X	Alternatively, you can use:
X		/ALIAS SHOWA FOREACH a i ECHO $$a[$$i]
X	to get:
X		ONE
X		TWO
X		THREE
X		FOUR
X		FIVE
X	Note that if you use numbers, 11 comes before 2.
X	The easiest way around this is to start numbering
X	elements at a higher number, such as 100.
X	Note that FOREACH, like WHILE, does variable
X	substitution once when the FOREACH command is
X	evaluated, and once for each iteration. This
X	means that in general you will need to double
X	up any occurences of '$'.
X
X2.1.5b-2.1.5g
X
X	Functionality of WHO -HOST and WHO -SERVER returned.
X
X	New WHO flags, -HERE and -AWAY added.
X
X	New functions:
X
X	MATCH(pattern word-list) Returns an index into the word
X				list of the first word that matches
X				the pattern, starting at 1 and
X				returning 0 for no match.
X	RMATCH(word pattern-list) Returns an index into the pattern
X				list of the pattern that word best
X				matches.
X	STRIP(charlist line)	Strips all occurrences of characters
X				contained in charlist from the line.
X
X	You no longer need to supply the leading # to JOIN and PART.
X	If the leading # is omitted, and you are on a 2.7 server,
X	it will be inserted. Notable exceptions to this rule are
X	channel '#', which would have no name if the # were omitted,
X	and channels beginning with '##'.
X
X	CTCP Action format changed so as not to interfere with channel
X	text. ON ACTION and ON SEND_ACTION added. You can now suppress
X	ACTION text with these, or reformat it.
X
X	Many bugs fixed.
X
X2.1.5-2.1.5a
X
X	New functions:
X
X	USERHOST()		Returns the user@host of the sender
X				of the message currently being
X				processed.
X
X	WHO -HOST and -SERVER is no more supported. (This is reenabled
X	in a later version).
X
X	The contents of an alias can now be surrounded by '{' and '}'
X	in and broken over multiple lines. See script/finger for an example.
X
X	Indentation with leading tabs and spaces is now permitted in script
X        files. See /HELP LOAD.
X
X	HOLD_MODE no longer holds when you are being active in that window.
X
X	If you have SHOW_AWAY_ONCE on, away messages are remembered and
X	only displayed when they change.
X
X	Notification of the receipt of a CTCP request no longer occurs
X	unless VERBOSE_CTCP is on.
X
X	Prompts from EXECed processes now appear in the input window if
X	$T appears in INPUT_PROMPT.
X
X	Scripts and help files can now be stored in compressed format.
X	They will be uncompressed as they are used.
X
X	All the scripts have been updated and many helpfiles written and
X	rewritten.  Many bugs have been fixed, support of newer server
X	features added. Server 2.7 compatibility improved.
X
X	There have been major changes in the command parser. Commands
X	are not expected to have a leading / unless entered interactively,
X	if you experience incompatibilities, you will have to add 'say' and 
X	'send' wherever you have made aliases that send to the channel or query.
X	See also /help ircII programming for this. Also the ';' has a new
X	meaning as command seperator within ALIAS, BIND and ON. You might have
X	to \escape it.
X
X	CTCP ACTION has been implemented which permits you to send
X	descriptions of actions/'feelings' to other people on channels
X	and even through queries. You can use it with /me and the action
X	script. See also: /help load action.
SHAR_EOF
# ============= config.h.lynx ==============
echo "x - extracting config.h.lynx (Text)"
sed 's/^X//' << 'SHAR_EOF' > config.h.lynx &&
X/* 'new' config.h:
X *	A configuration file designed to make best use of the abilities
X *	of ircII, and trying to make things more intuitively understandable.
X *
X * Done by Carl v. Loesch <lynx@dm.unirm1.it>
X * Based on the 'classic' config.h by Michael Sandrof.
X * Copyright(c) 1991 - See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT 
X *
X * Warning!  You will most likely have to make changes to your .ircrc file to
X * use this version of IRCII!  Please read the NOTES file supplied with the
X * distribution for details!
X */
X
X/*
X * Set your favorite default server list here.  This list should be a
X * whitespace separated hostname:portnum:password list (with portnums and
X * passwords optional).  This IS NOT an optional definition. Please set this
X * to your nearest servers.  However if you use a seperate 'ircII.servers' file
X * and the ircII can find it, this setting is overridden.
X */
X#define DEFAULT_SERVER "arbi"
X
X/*
X * Uncomment the following if the gecos field of your /etc/passwd has other
X * information in it that you don't want as the user name (such as office
X * locations, phone numbers, etc).  The default delimiter is a comma, change
X * it if you need to. If commented out, the entire gecos field is used. 
X */
X#define GECOS_DELIMITER ',' /**/
X
X/*
X * Set the following to 1 if you wish for IRCII not to disturb the tty's flow
X * control characters as the default.  Normally, these are ^Q and ^S.  You
X * may have to rebind them in IRCII.  Set it to 0 for IRCII to take over the
X * tty's flow control.
X */
X#define USE_FLOW_CONTROL 0
X
X/*
X * Below you can set what type of mail your system uses and the path to the
X * appropriate mail file/directory.  Only one may be selected. 
X * You may also undefine both if you think mail checking in irc clients is
X * silly.
X */
X/* AMS_MAIL is the Andrew Mail System mail format. */
X/* #define AMS_MAIL "Mailbox"	/**/
X
X/* UNIX_MAIL is the normal unix mail format.  */
X/* #define UNIX_MAIL "/usr/mail"	/**/
X
X/* MAIL_DELIMITER specifies the unique text that separates one mail message
X * from another in the mail spool file when using UNIX_MAIL. */
X/* #define MAIL_DELIMITER "From "
X
X/* The automatic reconnect on server-kill feature of ircII has often
X * caused problems, even though there is a mechanism to slow it down,
X * it is still hard to deal with situations when the user being killed isn't
X * interactively able to stop the client, that is - the ircII
X * is somehow running in background. It's up to you.  */
X/* #define AUTO_RECONNECT */
X
X/* Thanks to Allanon a very useful feature, when this is defined, ircII will
X * be able to read help files in compressed format (it will recognize the .Z)
X * If you undefine this you will spare some code, though, so better only
X * set if you are sure you are going to keep your help-files compressed.
X */
X#define ZCAT "/usr/ucb/zcat"
X
X/* Make ^Z stop the irc process by default,
X * if undefined, ^Z will self-insert by default
X */
X#define ALLOW_STOP_IRC /**/
X
X/* Back in the old days of irc it was normal for irc clients to throw
X * out a person that got killed by an oper. Let's get back to this
X * good tradition.
X */
X#define QUIT_ON_OPERATOR_KILL /**/
X
X/* Maximum number of allowed notify nicknames. If you don't want your
X * users to overload the server with notify data, give it a limit.
X * You can also undefine this, then you spare a few bytes of code.
X */
X#define MAX_NOTIFY 50
X
X/* And here is the port number for default client connections.  */
X#define IRC_PORT 6667
X
X/* HELP_SERVICE should never be commented out. */
X#define HELP_SERVICE "IrcIIhelp"
X
X/*
X * Uncomment the following to make ircII read a list of irc servers from
X * the ircII.servers file in the ircII library. This file should be
X * whitespace separated hostname:portnum:password (with the portnum and
X * password being optional). This server list will supercede the
X * DEFAULT_SERVER. 
X*/
X#define SERVERS_FILE "ircII.servers"
X
X/* Uncomment the following if you want ircII to display the file
X * ircII.motd in the ircII library at startup.
X */
X#define MOTD_FILE "ircII.motd"
X
X/*
X * Below are the IRCII variable defaults.  For boolean variables, use 1 for
X * ON and 0 for OFF.  You may set string variable to NULL if you wish them to
X * have no value.  None of these are optional.  You may *not* comment out or
X * remove them.  They are default values for variables and are required for
X * proper compilation.
X */
X#define DEFAULT_ALWAYS_SPLIT_BIGGEST 1
X#define DEFAULT_AUTO_UNMARK_AWAY 0
X#define DEFAULT_AUTO_WHOWAS 0
X#define DEFAULT_BEEP 1
X#define DEFAULT_BEEP_MAX 7
X#define DEFAULT_BEEP_ON_MSG "NONE"
X#define DEFAULT_BEEP_WHEN_AWAY 1
X#define DEFAULT_CHANNEL_NAME_WIDTH 10
X#define DEFAULT_CLOCK 1
X#define DEFAULT_CLOCK_24HOUR 1
X#define DEFAULT_CLOCK_ALARM NULL
X#define DEFAULT_CMDCHARS "/"
X/* this one is new */
X#define DEFAULT_COMMAND_MODE 0
X#define DEFAULT_CONTINUED_LINE "  "
X#define DEFAULT_DISPLAY 1
X#define DEFAULT_ENCRYPT_PROGRAM NULL
X#define DEFAULT_EXEC_PROTECTION 1
X#define DEFAULT_FLOOD_AFTER 3
X#define DEFAULT_FLOOD_RATE 3
X#define DEFAULT_FLOOD_USERS 3
X#define DEFAULT_FLOOD_WARNING 0
X#define DEFAULT_FULL_STATUS_LINE 1
X#define DEFAULT_HELP_PAGER 1
X#define DEFAULT_HELP_WINDOW 0
X#define DEFAULT_HIDE_PRIVATE_CHANNELS 1
X#define DEFAULT_HISTORY 30
X#define DEFAULT_HISTORY_FILE NULL
X/* with the new pleasant 'hold only when really necessary' hold mode
X * it is acceptable to use it by default
X */
X#define DEFAULT_HOLD_MODE 1
X#define DEFAULT_HOLD_MODE_MAX 0
X#define DEFAULT_INDENT 1
X#define DEFAULT_INPUT_ALIASES 0
X#define DEFAULT_INPUT_PROMPT NULL
X#define DEFAULT_INSERT_MODE 1
X#define DEFAULT_INVERSE_VIDEO 1
X#define DEFAULT_LASTLOG 44
X#define DEFAULT_LASTLOG_LEVEL "ALL -CRAP"
X#define DEFAULT_LOG 0
X#define DEFAULT_LOGFILE "IrcLog"
X#define DEFAULT_MAIL 1
X#define DEFAULT_MINIMUM_SERVERS 0
X#define DEFAULT_MINIMUM_USERS 0
X#define DEFAULT_NOTIFY_ON_TERMINATION 0
X#define DEFAULT_PAUSE_AFTER_MOTD 1
X/* QUIT_ON_KILL gone already */
X#define DEFAULT_SCROLL 1
X#define DEFAULT_SCROLL_LINES 1
X#define DEFAULT_SEND_IGNORE_MSG 1
X#define DEFAULT_SHELL "/bin/sh"
X#define DEFAULT_SHELL_FLAGS "-c"
X#define DEFAULT_SHELL_LIMIT 0
X/* this one is new */
X#define DEFAULT_SHOW_AWAY_ONCE 1
X#define DEFAULT_SHOW_CHANNEL_NAMES 1
X#define DEFAULT_SHOW_END_OF_MSGS 0
X#define DEFAULT_SHOW_NUMERICS 0
X#define DEFAULT_STATUS_AWAY "(away) "
X#define DEFAULT_STATUS_CHANNEL "on %C "
X#define DEFAULT_STATUS_CLOCK " %T "
X#define DEFAULT_STATUS_FORMAT "%T[%R] %*%N %S%H%Q%A%C%+%I%O%M%U %W"
X#define DEFAULT_STATUS_HOLD "--- more --- "
X#define DEFAULT_STATUS_INSERT ""
X#define DEFAULT_STATUS_MODE "(+%+) "
X#define DEFAULT_STATUS_MAIL "[Mail: %M] "
X#define DEFAULT_STATUS_OPER "*"
X#define DEFAULT_STATUS_OVERWRITE "(overtype) "
X#define DEFAULT_STATUS_QUERY "[Query: %Q] "
X#define DEFAULT_STATUS_SERVER "via %S "
X#define DEFAULT_STATUS_USER "* type /help for help"
X#define DEFAULT_STATUS_WINDOW "^"
X#define DEFAULT_SUPPRESS_SERVER_MOTD 0
X#define DEFAULT_USE_OLD_MSG 0
X#define DEFAULT_USERINFO "Huh? Who wants to know?"
X#define DEFAULT_VERBOSE_CTCP 0 
X/* DEFAULT_VERBOSE_QUERY is gone */
X#define DEFAULT_WARN_OF_IGNORES 1
SHAR_EOF
# ============= example_menu ==============
echo "x - extracting example_menu (Text)"
sed 's/^X//' << 'SHAR_EOF' > example_menu &&
X# Test menu to see how our menu reader works
X
XMENU Main Menu
X	OPTION "This menu" MENU Main Menu
X	OPTION "List Channels" COMMAND LIST
X	OPTION "Join Channel" COMMAND JOIN $"Join Channel: "
X	OPTION "Leave Channel" COMMAND PART *
X	OPTION "Change Name" COMMAND NICK $"New NickName: "
X	OPTION "Private Message" COMMAND MSG $"Person to send message to: " $"Text of message: "
X	OPTION "Say something" COMMAND SAY $"Say: "
X	OPTION "Exit Menu" EXIT
X	OPTION "Exit IRC" COMMAND if ( [$"Really quit? "] == [y] ) { QUIT }
X	OPTION "Kill Menu" COMMAND set -menu
SHAR_EOF
# ============= man/ircII.1 ==============
if test ! -d 'man'; then
    echo "x - creating directory man"
    mkdir 'man'
fi
echo "x - extracting man/ircII.1 (Text)"
sed 's/^X//' << 'SHAR_EOF' > man/ircII.1 &&
X.TH IRC 1L "4 February 1990"
X.SH NAME
XircII \- interface to the Internet Relay Chat system
X.SH SYNOPSIS
X.B irc
X.RB [ \-c
X.IR chan ]
X.RB [ \-p
X.IR portno ]
X.RB [ \-d ] 
X.RB [ \-f ]
X.RB [ nickname
X.RI [ "server list" ]]
X.RB [ \-l
X.RI "file name"
X.RB ]
X.RB [ \-e
X.I process
X.RI [ "arguments to process" ]]
X.SH DESCRIPTION
XThe
X.I ircII
Xprogram is a full screen, termcap based interface to Internet Relay Chat.
XIt gives full access to all of the normal
X.I IRC
Xfunctions, plus a variety of additional options.
X.SH OPTIONS
X.TP
X.BI \-c " chan"
XAutomatically join channel
X.I chan .
X.TP
X.BI \-p " portno"
XSet the port number to
X.I portno
X(default: 6667, the standard
X.I IRC
Xport).
XOnly supply this if you connect to a server which uses a port other than 6667.
X.TP
X.B \-d
XStart in "dumb" mode.
XAll input is taken directly from stdin and all output goes to stdout
Xwithout using any of the
X.IR termcap (5)
Xscreen control codes.
X.TP
X.B \-f
XUse flow control (^S and ^Q) to stop/start the display.
XNormally these are both bound to other functions within
X.IR irc .
XThis switch is ignored if the
X.B \ -d
Xor
X.B \-e
Xswitches are used.
X.TP
X.I nickname
XSet the nickname
X(overrides the environment variable
X.BR IRCNICK ;
Xdefault: the username).
X.TP
X.I server
XSet the list of servers with which
X.B irc
Xwill try to connect upon startup.
XThis list is also used by the program's
X.B /server
Xcommand.
XThe format for lines in the list is:
X.IP
X.B hostname
X.RB [: portno
X.RB [: password ]]
X.TP
X.BI \-l " file name"
XSelects a different file to be used as the .ircrc file for 
X.B ircII .
XThe default is $HOME/.ircrc.
X.TP
X.BI \-e " process"
XStart a process which takes the output of
SHAR_EOF
echo "End of  part 1"
echo "File man/ircII.1 is continued in part 2"
echo "2" > shar3_seq_.tmp
exit 0