EPIC4-1.2.0

*** News 02/13/2002 -- Completely redesigned /QUEUE command
	The /QUEUE command has been completely revamped and redesigned.
	The old quirky bugs and mis-features and poor design have been
	removed and replaced with a better system.  Forget about how 
	/QUEUE used to work, here is how it works now. =)

	/QUEUE				List the name and size of all pending 
					 queues
	/QUEUE -SHOW			List the name and contents of all 
					 pending queues
	/QUEUE -LIST <name>		List the contents of the <name>d queue
	/QUEUE -FLUSH <name>		Delete the queue and all of its contents
	/QUEUE -DELETE <name> <number>	Delete the <number>th entry in the 
					 <name>d queue; all entries are moved 
					 down one position.  Entries are 
					 counted from number 1.
	/QUEUE -DO <name>		Run the contents of the <name>d queue
					 and delete the queue when done.
	/QUEUE -DO -NO_FLUSH <name>	Run the contents of the <name>d queue
					 but do not delete the contents.
	/QUEUE -EXPAND_NOW <name> { <commands> }
					Expand <commands> now, and then add
					 the result as a new entry to the
					 <named>d queue.  SEE NOTES BELOW.
	/QUEUE <name> { <commands> }	Add <commands> as a new entry to the
					 <name>d queue.
	/QUEUE -HELP			Syntax information for /QUEUE.

	In general, queues are created when you first add a command to them.
	Queues are destroyed when they are run, or when you flush them.  It
	is not an error and you will not get a message if you try to flush
	a queue that does not exist.  If you try to operate on a queue that
	does not have any commands, you will get an error message.  While you
	may be able to get away with specifying flags in combinations other
	than the ones listed above, it is not recommended.

	With that out of the way, you may be asking, "What are /QUEUEs?"
	Queues are named entities into which you can put an arbitrary number
	of commands, which you want to execute all of at some later time.
	The absolutely most obvious use of this is to programmatically 
	create an "unload" feature for a script pack.  Every file can add
	an entry into some named queue to un-do the effects of that script.
	This can be much more effective than /unload, which is rather 
	primitive.

	The old /QUEUE had some big problems; it always expanded your 
	<commands> twice -- once when you added them to the /queue and then
	once again when they were executed.  This subjected your commands to
	"quoting hell" and made using /QUEUE awkward since you had to make
	sure none of your expandos contained more expandos.

	Now /QUEUE will only expand your <commands> once: just before they
	are executed.  Now, you might be thinking "what about $* and $0 and
	$1 and so forth?"  The good news is that /QUEUE saves $* and uses it
	when <commands> is executed.  This means that you _can_ use $* and $0
	and $1 and so on in your <commands>, and they will expand to whatever
	they would have been when you added them to the /queue.  However, any
	OTHER expandos (such as $N or $C or function calls) will all be 
	expanded with their values _just before the command is run_ and NOT
	with the values they had at the time you added the command to the
	/queue!  THIS BREAKS BACKWARDS COMPATABILITY.  If you need backwards
	compatable behavior for some bizarre reason, the -EXPAND_NOW flag is
	available to simulate the original behavior of /QUEUE.  I would urge
	you to only use this as a crutch and to stop using it as soon as you
	can arrange it.

*** News 02/02/2002 -- New special /MSG target, target 0
	If you send a message to target 0 (/msg 0) then EPIC will just
	silently drop the message with no output.  This was done, because
	/REDIRECT 0 is already a "sink"; but now you can use target 0 as
	a "sink" anywhere you might want to go through the motions of
	sending a message but don't actually want messages to be sent.
	For example, /query 0 would accept and discard all "target text"
	Target 0 was chosen because it is an illegal irc target, and because
	/REDIRECT 0 already has these semantics.  Hopefully this should not 
	break anybody.

*** News 02/02/2002 -- New special /MSG targets, @<fileref> and @w<winref>
	Files that you have opened with $open() may now be /msg'd using the
	special syntax /MSG @<fileref> where <fileref> is the return value
	of $open.  You can of course /query @<fileref> or /redirect to it;
	anything that sends a message can use @<fileref> to send to an 
	$open() file.

	Since <fileref> infers by inclusion the ability to write to a
	window or global logfile (see below), you can also /MSG, /QUERY,
	/REDIRECT, or in any other way send a "message" to a window's
	logfile or to the global logfile, with /MSG @w<winref> where 
	<winref> is the window's refnum, or -1 for the global logfile.

*** News 02/01/2002 -- New /WINDOW verb, /WINDOW NOTIFIED
	This window action manually toggles a window's "notified" state.
	A window that is "notified" shows up in the %F status line expando.
	Normally, the "notified" state is set and reset automatically by
	EPIC, but you can change it manually now with this if you wish.

*** News 02/01/2002 -- /SET NOTIFY_INTERVAL 0 now suspends notify.
	If you want to turn off NOTIFY for a while, but you don't want
	to clear your notify list, you can /SET NOTIFY_INTERVAL 0 and
	no NOTIFY activity will occur until you /SET NOTIFY_INTERVAL 
	to some non-zero value.  Remember that the value is in seconds
	and the default is 60 (every minute).

*** News 02/01/2002 -- $channel() value now includes half-op information
	If a user is known to be a half-op, then the '%' character will
	be present in the first position before their nick.  This is the
	position where you would normally see a @ for a channel operator.
	Example:
		$channel() might return		%.NICKNAME
	if "NICKNAME" were a half-op on your current channel.

*** News 02/01/2002 -- New flag to /LASTLOG, /LASTLOG -FILE
	If you want to dump the results of the /LASTLOG command to a 
	file, you can now specify a filename with the -FILE flag. 
	Example:
		/LASTLOG -FILE myfile booya
	will output all lines in your lastlog matching "booya" to the
	file "myfile"

	This is similar in principle to:
		@fd = open(myfile W)
		redirect @$fd lastlog booya
		@close($fd)

*** News 02/01/2002 -- /IF command supports "elif" and "else if" clauses
	In addition to the following supported forms:
               if (expr) ......
               if (expr) {......}
               if (expr) {......} {......}
               if (expr) {......} else {......}
               if (expr) {......} elsif (expr2) {......}

	the following two forms are now supported:
               if (expr) {......} elif (expr2) {......}
               if (expr) {......} else if (expr2) {......}

*** News 02/01/2002 -- New built in functions, $serverourname()
	EPIC keeps track of two different names for every server in your 
	server list: "ourname" and "itsname".  "Ourname" is the name that
	you give to EPIC in the /SERVER or /WINDOW SERVER command or in
	the server file list.  When we are officially registered and
	accepted by the server, the server tells us what "itsname" is,
	this is the name given in the server's M: configuration line.
	This is the name it uses when it refers to itself.  $servername()
	already returns "itsname" [if we know "itsname"] or "ourname" if
	we don't know "itsname" yet.  This function lets you get "ourname"
	at any time, even after registration.

*** News 02/01/2002 -- New built in functions, $servergroup()
	This returns the server's group name that you specified in the
	/SERVER or /WINDOW SERVER command or in the server file list.

*** News 02/01/2002 -- New built in function, $regmatches()
	This is a (slightly) more useful copy of the $regexec() function.
	It takes an extra argument between complied-pattern and string
	indicating the number of matches to return.  Returned matches are
	_not_ expressed as strings, but pairs of numbers which can be
	applied to $mid() to extract the matched substring.  Please note
	that substrings do not refer to multiple occurences of strings.
	At least, not in the glibc implementation I'm using.

*** News 02/01/2002 -- New built in function, $corpattern()
	Whereas $copattern(<pattern> <var1> <var2>) treats $<var1> as a
	list of words, which are matched against <pattern> and whereas
	the corresponding words from $<var2> are returned for each word 
	in $<var1> that is matched by <pattern>...

	$corpattern(<string> <var1> <var2>) treats $<var1> as a list of
	patterns, which are matched against <string>, and the corresponding
	words in $<var2> are returned for each pattern in $<var1> that
	matches <string>

*** News 02/01/2002 -- /ON CTCP_REPLY HAS CHANGED! VERY IMPORTANT!
	Prior to this release, /ON CTCP_REPLY looked like this:
		$0  - Nick who sent the CTCP reply
		$1  - The CTCP command
		$2- - The arguments to the CTCP

	THIS HAS CHANGED AND YOU WILL NEED TO CHANGE YOUR /ON CTCP_REPLY's!
	Now /ON CTCP_REPLY looks like this:
		$0  - Nick who sent the CTCP REPLY
		$1  - Target (nick or channel) to whom the CTCP was sent
		$2  - The CTCP command
		$3- - The arguments to the CTCP

*** News 02/01/2002 -- New flag to /XQUOTE, /XQUOTE -U
	Usage:
		/XQUOTE -U <url encoded string>
	A <url encoded string> is a normal string that may also contain
	%'s followed by two hexidecimal digits.  For each such instance of
	%<hexdigit><hexdigit>, the instance is replaced with the corresponding
	ascii character.  For example, "%20" would be replaced with a space.
	The resulting decoded string is sent to the server as-is.

	This function is useful if you need to send binary or other arbitrary
	data to the server.

*** News 02/01/2002 -- New built in script, 'commandqueues'
	This uses several clever tricks to evade ircII's "quoting hell".
	The following commands are available:

	/1cmd <time> <command>		
		Execute <command>, but only if <command> has not been executed
		already by /1cmd in the previous <time> seconds.

	/qcmd <queue> <command>	
		Add <command> to the end of queue <queue>, which will be 
		executed sequentially in 5 second intervals.  Queues with a
		lower alphanumerical value will be drawn from first, and hence
		have a higher priority.

	/fqcmd <queue> <command>	
		Add <command> to the beginning of queue <queue>, which will 
		be executed sequentially in 5 second intervals.

	/q1cmd <time> <queue> <command> 
		Equivalent to: /1cmd <time> qcmd <queue> <command>
		as long as <command> is not already queued in <queue>

	/fq1cmd <time> <queue> <command>
		Equivalent to: /1cmd <time> fqcmd <queue> <command>
		as long as <command> is not already queued in <queue>

	Commands are executed in "literal" form (not subject to "quoting hell")

*** News 02/01/2002 -- $uhc(), $mask(), and /ignore handle userhosts different
	It is a bug for these to behave any differently from before except in
	the case of a hostname with no dot in it, in which case they behave
	more appropriately by not inserting eroneous dots and stars into said
	hostname, as before.

*** News 02/01/2002 -- SSL support merged from the EPIC4-SSL project
	Read the "README.SSL" file for some more information about the
	particulars of SSL support, but here is a general overview:

	When configuring EPIC before building it, to include SSL support:
		./configure --with-ssl=/path/to/your/ssl/stuff
	If you want to use SSLv2 instead of SSLv3 (the default), use:
		./configure --with-ssl-ver=v2

	To connect to a server using SSL:
		/WINDOW SERVER -SSL <SERVERNAME>
	(You cannot currently connect to an SSL server at startup time.)

	New built in functions:
	    $ssl()
	      Returns 1 if SSL server connections are available, 0 if not.
	    $isencrypted()
	    $isencrypted(<servref>) 
	      These return 1 if the server refnum (or current server)
	      are SSL server connections, 0 if they are not.
	    $cipher()
	      Returns cipher information for an SSL server connection.

	New hook:
	    /ON SSL_SERVER_CERT
		  $0  - server name
		  $1  - certificate subject (urlencoded)
		  $2  - certificate issuer (urlencoded)
	    It is up to the scripter to accept or reject server certificates.

	New status bar expando:
	    The %| status bar expando will expand to either the value of
	      /SET STATUS_SSL_ON or /SET STATUS_SSL_OFF depending on whether
              the connection is SSL-enabled or not.

	New built in /SETs:
	    SSL_CERTFILE  - Path to certificate for SSL-enabled connections
	    SSL_KEYFILE   - Path to key file for SSL-enabled connections
	    SSL_PATH      - <I don't know what this does>
	These sets do not do anything at the current time but probably will
	be used in the future.
	    STATUS_SSL_ON  - What %| will be for SSL server connections
	    STATUS_SSL_OFF - What %| will be for non-SSL server connections

*** News 02/01/2002 -- /ENCRYPT command takes additional argument
	The /ENCRYPT command may now be used in a couple of new ways:
		/ENCRYPT <target> <password>
		/ENCRYPT <target>,<sender> <password>
		/ENCRYPT <target> <password> <program>
		/ENCRYPT <target>,<sender> <password> <program>

	The nickname argument may now be a wildcard pattern; but only if it
	is in the format:
		<target>,<sender>
	where <target> is a channel, or your own nickname, and <sender> is
	a full <nick>!<user>@<host> prefix.  

	The /encrypt command can take an additional <program> argument after
	nick and key, which will be run to encrypt and decrypt your messages.
	Two usable example scripts have been supplied which use GNU Privacy 
	Guard in symetric encryption mode.  

	Example:
		/encrypt #epic,*!*@epicsol.org keypass mycrypto
	Would decrypt any messages sent to #epic by anyone at *!*@epicsol.org
	with the "mycrypto" program using the password "keypass"

*** News 02/01/2002 -- New built in function, $encryptparm()
	The $encryptparm(<nick>) function will return the command line
	argument that was passed to the /ENCRYPT command when you first
	established the encrypted conversaion with <nick>

	Example:
		$encryptparm(#epic,hop!jnelson@epicsol.org)
	might return, using the above example...
		#epic,*!*@epicsol.org keypass mycrypto

	This is likely to be useful for public key crypto scripts.

*** News 02/01/2002 -- Change to $trunc(0 <num>) : it now returns an integer
	$trunc(0 <num>) returns the integer <retval> with the largest absolute 
	value that lays between <num> and 0.  In other words, $trunc(0 <num>) 
	returns <num> with the decimal point and anything after it removed.

*** News 02/01/2002 -- New math built in functions $ceil(), $floor(), $abs().
	$ceil(<num>) -- Returns the smallest integer that is greater than or 
			equal to <num>
	$floor(<num>) -- Returns the largest integer that is less than or
			 equal to <num>
	$abs(<num>) -- Returns the absolute value of <num>

*** News 02/01/2002 -- Ability to use $write(), $writeb() to logfiles
	Currently, you can use $write(<fd> <text>) to write a line of <text>
	to the file <fd> where <fd> was previously returned by $open().
	But if you want to write to a window's logfile, you can do that by
	replacing <fd> with the literal character "w" followed by the window
	refnum.  As a special case, "w-1" refers to the global logfile.
	Please remember that window refnum 0 is always the current window.  

	Example:
		@ write(w-1 This text will go to the global logfile)
		@ write(w3 This text will go window 3's logfile)

*** News 02/01/2002 -- New /ON, /ON GENERAL_PRIVMSG
	Arguments:
		$0  - Nickname who sent the privmsg
		$1  - Target (nickname/channel) the privmsg was sent to
		$2- - The privmsg itself.

	If you catch this hook silently (/ON ^GENERAL_PRIVMSG), then 
	/ON PUBLIC_MSG, /ON MSG_GROUP, /ON MSG, /ON PUBLIC, and 
	/ON PUBLIC_OTHER will not be hooked for the same privmsg.

*** News 02/01/2002 -- New /ON, /ON GENERAL_NOTICE
	Arguments:
		$0  - Nickname/server who sent the notice
		$1  - Target (nickname/channel) the notice was sent to
		$2- - The notice itself.

	This hook is offered after /ON KILL or /ON OPER_NOTICE (if they
	apply), but before /ON SERVER_NOTICE, /ON NOTICE, and /ON PUBLIC_NOTICE
	are offered.

*** News 12/19/2001 -- New /SET, /SET ALLOW_C1_CHARS (defaults to OFF)
	The ascii characters 128 to 159 on many terminal emulators
	(especially GNU Screen and XTerm) have special control meanings
	which can be disasterous for users.  EPIC has traditionally allowed
	you to output characters in this range without question.  However,
	due to many requests, a /SET has been added.  Characters in this
	range will be stripped out if this /SET is off.  Otherwise, the
	traditional behavior will be retained.  This is a deviation from 
	traditional practice, but it is an important deviation, as it will
	protect most users from rogue users.

*** News 12/19/2001 -- ROM_CHAR functionality removed
	A little known feature of EPIC, the ^R attribute, could be followed
	by three ascii digits, and the decimal number following the ^R
	attribute would be inserted into the output at that point.  It was
	vulnerable to exploitation by outside attackers, and is very 
	difficult to secure against exploitation.  For this reason, the
	feature has been removed until we can figure out how to properly
	implement it.  If you used this feature, I apologize, but it is for
	the greater good that we must remove this feature for now.

*** News 12/19/2001 -- New option to $info(), $info(i)
	The $info(i) built in function will return the "commit_id" value
	for the version of epic you're using, which is a monotonically
	increasing integer value which changes every time a changes is
	made to epic's source.  This value is important whenever you 
	report a bug about epic.

*** News 11/14/2001 -- Final conversion to the new epic mailing list
	For a while now we have been using list@epicsol.org, but
	the epic sources still refered to ircii-epic@concentric.net.
	That old list is now officially deceased and is no longer in
	operation and should not be used.  Eventually it will go away.

*** News 11/14/2001 -- Support for ~/.epicrc file
	LET ME JUST START BY SAYING THIS IS NOT MODELED AFTER BX.
	Some of you use both epic and ircII and you would like to be
	able to keep separate .ircrc files and .epicrc files.  Now you
	can do that.  If you have a ~/.epicrc file, then epic will load
	that and WILL NOT LOAD your ~/.ircrc.  If you do not have a
	~/.epicrc file, then epic will load your ~/.ircrc as it always
	has.  The EPICRC environment variable is accepted; it behaves
	in the same way as the IRCRC environment variable.

*** News 11/14/2001 -- Color support has changed somewhat
	Before this date, color handling was done by reacting to each
	attribute change.  For example, a ^B either turned bold on, or
	it turned it off.  But EPIC didn't keep track of ther attributes,
	and on some systems, turning bold off turned reverse and color off.
	Also, turning on color turned off reverse and bold.  Many scripts 
	have come to kludge around this by "assuming" that turning certain 
	things on (like color) or off (like bold) had side effects on other
	attributes.  This was never intentional and it is certainly confusing.
	On this date, a new attribute parser was introduced that does not
	impose *any side effects whatsoever* on attribute changes.  If you
	change colors, it will NOT turn off bold or reverse.  If you turn off
	bold it will NOT turn off colors or underline.  If you turn on bold,
	it will NOT turn off colors.  Each attribute (bold, underline,
	reverse, flash, color) are handled independantly and separately.
	Each time you turn an attribute on or off, only that attribute is
	affected.  The sum result of what you see on the screen is then
	the cumulative effect of all the attributes which are on.  This
	means if you turn bold on and then turn on color, you will get 
	bold color.  If you turn on reverse and turn on color, you will 
	get reversed colors.  If you turn on reverse, turn on color, then
	turn off color, you will still have reverse!  Hopefully this will
	make everything much more sane and clean.

*** News 11/13/2001 -- Resizable wserv support (wserv4), /SET WSERV_PATH
	I backported the implementation of wserv4 from EPIC5.  The main
	features of wserv4 are that it uses two channels of communication
	to talk to epic, and it can support independant resizing of each
	screen.  Until now, all of your /window create screens had to be 
	exactly the same size as your main screen or they wouldn't work.  
	That restriction has now been removed.  All of your screens can be
	of whatever size you wish and you can resize them at will.  There
	is a new /SET available,  /SET WSERV_PATH which points to whatever
	wserv you want to use.  By default it points to epic's wserv, but
	just in case your sysadmin didn't install wserv4, you could 
	compile it yourself and /SET WSERV_PATH to it.

*** News 11/13/2001 -- /FLUSH now uses the "redirect sink"
	Until now, /FLUSH worked by actually throwing away all data from
	the server until there was a 1 second pause.  Since none of this
	data was processed, if things like JOINs or QUITs or KICKs were
	thrown away, the client could become terribly confused and possibly
	even crash.  This has changed: now the /flush command does not
	throw away all input from the server, but instead just suppresses
	all output for the current server command.  This means that all of
	your /on's will still be processed, but you won't have to see the
	output (if you were doing a /who ** or a /links for exmaple).
	Bottom line: it is now safe to do /flush again!

*** News 11/13/2001 -- The "redirect sink" -- target 0, and practice uses
	You may now do /REDIRECT 0 to suppress all output from a server
	command.  Target 0 is called the "redirect sink" and any output
	that is redirected to it will NOT be displayed.  This technique
	is very useful for trapping only a few /on's for a complex query
	(such as /whois) and not having to worry about extra/unknown 
	numerics cluttering up the user's screen.  Consider this:

			on ^318 * { @count++ }
			redirect 0 whois hop

	Normally, if you were to do "whois hop", you would see all the other
	numerics, which would be ugly if you're trying to catch the whois
	replies with /on's.  This is especially true for networks which use
	extra numerics in their whois replies that your script may not know
	about.  So if you just /redirect 0 your server queries, then any
	/on's that you don't catch that would otherwise send output to the
	user's screen will redirect their output to the "sink", ie, it will
	not be displayed.  This should make it much easier to script whois
	replies.

*** News 11/12/2001 -- /TIMER, /PAUSE now have sub-second resolution
	Previously, /TIMER and /PAUSE have had whole-second granularity.
	This means that when you asked for a timer to go off in N seconds,
	the timer would actually go off in N seconds, give or take one second
	(the resolution).  This was because the I/O looper in EPIC only worked
	on whole-second granularity.  The I/O looper has been rewritten to
	use microsecond resolution, so now /TIMER and /PAUSE will go off in
	N seconds, give or take a microsecond.  This also allows you to 
	specify sub-second resolution:  You can do /timer 1.5 ... and your
	timer will go off in 1.5 seconds, not 1 second, not 2 seconds.

*** News 11/12/2001 -- Changes to /SETENV let you unset environment variables
	You may now unset environment variables with the /SETENV command by
	prefixing the environment variable name with a single hyphen and by
	omitting the second argument, like so:
		/SETENV -IRCSERVER
	You can still set an environment variable that starts with a hyphen:
		/SETENV -FOO one two three
	You can unset an environment variable that starts with a hyphen:
		/SETENV --FOO
	You can set an environment variable with no value:
		/SETENV EMPTYVAR
	but you can't set an empty environment variable that starts with
	a hyphen (sorry).  If anyone ever finds that they actually need to
	be able to do this, let me know and we'll work something out.

*** News 11/12/2001 -- New built in functions for file manipulations
	Several new functions have been added to help you manipulate files
	that are opened with $open().

	$fskip(<fd>)
	   This function reads the next line of the file and discards it.
	   It returns the end-of-file condition of the file after the read.
	   If <fd> is not a valid file, -1 is returned.

	$fseek(<fd> <numbytes> <whence>)
	   This function changes the file position indicator.  The file
	   position indicator is moved <numbytes> (a 31 bit signed number)
	   away from <whence>, which is a symbolic anchor with the following
	   possible values:
		SET	Move <numbytes> from the beginning of the file
		CUR	Move <numbytes> forward or backward from the
			current file position indicator
		END	Move <numbytes> forward or backward from the
			end of the file.
	   <numbytes> can't be greater than 2GB, and this is a limitation
	   in the fseek(3) interface, so don't complain to me about it.
	   If a seek error occurs, -1 is returned and $error(<fd>) will
	   return 1.  If <fd> Is not a valid file, -1 is returned.

	$frewind(<fd>)
	   This function sets the file position indicator to the beginning
	   of the file.  It is the same as $seek(<fd> 0 SET).  If <fd> is
	   not a valid file, -1 is returned.

	$ferror(<fd>)
	   This function returns the file error indicator, either 0 or 1.  
	   This is set whenever any error occurs and can be cleared by 
           resetting the file position indicator.  If <fd> is not a valid
	   file, -1 is returned.

	$isfilevalid(<fd>)
	   This function returns 1 if <fd> is a valid value previously 
	   returned by $open() and returns 0 otherwise.

#End of file
