EPIC5-2.0
EPIC5-1.8

*** News 01/30/2016 -- /WINDOW LOGFILE and /SET LOGFILE more like /LOG FILNAME
	Historically, changing a logfile name (with /WINDOW LOGFILE and
	/SET LOGFILE) does not affect the log status.  This leads to 
	unexpected behavior if you do /WINDOW LOG ON LOGFILE foo.txt
	because /WINDOW LOGFILE only changes the filename the *next* time
	you open the log, not affecting the currently open log.

	The behavior of /LOG FILENAME is more in line with what people 
	said they expected.  If you change /LOG FILENAME while the 
	log is ON, then it will 1) close the existing log, 2) change
	the filename, and 3) re-open the log under the new name.

	The behavior of /WINDOW LOGFILE and /SET LOGFILE have been changed
	to match the behavior of /LOG FILENAME -- changing the logfile name
	while it is open will close the existing log and open a new one.

EPIC5-1.6

*** News 01/08/2016 -- Per-server vhosts now restrict protocol (ipv4/ipv6)
	Historically, the client tries to connect to the server using the
	addresses as they are returned in order.  (This is a great thing 
	for round-robin or geographic-aware dns resolvers.)

	However, if you have a per-server vhost, you probably intend that
	epic use that vhost to connect to the server.  But what happens if
	your vhost is ipv4 only or ipv6 only, and the first address to the
	server is to the other protocol?  Historically, epic will just go 
	ahead and connect without your vhost.

	You've been able to correct this behavior by specifying explicitly
	the protocol family:
		/server irc.foo.com:proto=v6:vhost=irc.leet6.com
	Some folks said it violated POLA, so here's a new rule:

	"If you set a per-server vhost, then that server can only be 
	 connected to if the vhost can be used.  If ths means that no
	 addresses can be used, then you will not be able to connect 
	 to the server until you clear the vhost."

	This rule does not apply to you if you're using /HOSTNAME but
	only if you are doing something like 
		/server irc.foo.com:vhost=irc.leet6.com

*** News 01/01/2016 -- Can now /query an exec process that doesn't exist
	Previously, you were forbidden from setting up a /query to an 
	/EXEC process that didn't exist.  That set up a race condition
	between running an /EXEC process and being able to corral its 
	output into a window via the query.  

	So now you can /query an exec process before you start it.  

	If you try to send a message to it before you do fire it up, 
	the user will see a diagnostic telling them that the message 
	could not be sent to a non-existing exec process.

*** News 01/01/2016 -- New /window operation, /window log_mangle
	This allows you to overrule /SET MANGLE_LOGFILES for logs that
	you create with /WINDOW LOG ON (only!)
	Example:
		window logfile "my.windowlog" mangle NORMALIZE,COLOR log on

*** News 01/01/2016 -- New /window operation, /window log_rewrite
	This allows you to overrule /SET LOG_REWRITE for logs that
	you create with /WINDOW LOG ON (only!)
	Example:
		window logfile "my.windowlog" rewrite "HOOBOO $1-" log on

*** News 01/01/2016 -- Refinement to $pad(), $[len]var, and $leftpc()
	These functions do not behave graciously since our conversion
	to UTF-8, since they count code points rather than columns.
	It just seems sensible to redefine the behavior of these 
	functions based on columns, which is what everybody probably
	expects them to do.

	Function: $pad(len char string)
	Summary: Extend, but do not truncate, do not justify 'string'
	Definition: 
		Return 'string' so that it takes up at least 'len' columns.
		If it is too short, it will be padded with 'char's until
			it is 'len' columns wide.
		If it is too long, it is NOT truncated.

	Function: $leftpc(len string)
	Summary: Truncate, but do not extend, do not justify 'string'
	Definition:
		Return the first 'len' columns of 'string'.  
		If it is too short, it will NOT be padded.
		If it is too long, it will be truncated on the right end.

	Function: $[len]var
	Summary: Extend, truncate, and justify $var
	Definition:
		Return $var so that it takes up EXACTLY 'len' columns.
		If it is too short, it will be padded with /set pad_char
			until it is 'len' columns wide.
		If it is too long, it is truncated.
		If 'len' is > 0, then the string is left justified, and
			padding (or truncation) happens on the right end.
		If 'len' is < 0, then the string is right justified, and
			padding (or truncation) happens on the left end.

	Function: $fix_width(len justify pad string)
	Summary: Extend, truncate, and justify 'string'
	Definition:
		Return 'string' so it takes up EXACTLY 'len' columns.
		If it is too short, it will be padded with 'pad'
			until it is 'len' columns wide.
		If it is too long, it is truncated.
		If 'justify' is "l" then the string is left justified,
			and padding (or truncation) happens at the right
		If 'justify' is "c" then the string is centered, and 
			padding (or truncation) happens equally at both
			ends.
		If 'justify' is "r" then the string is right justified,
			and padding (or truncation) happens at the left.

*** News 09/15/2015 -- New /ON, /ON RAW_IRC_BYTES
	This new /ON, /ON RAW_IRC_BYTES is the same as /ON RAW_IRC, 
	except $* is the _raw unmodified bytes_ received from IRC.
	Specifically, $* is not guaranteed to be a UTF-8 string, so 
	functions that expect a UTF-8 string won't work.  You should
	not try to /ECHO the $* from this /ON.

	Just like /on raw_irc, if you catch this hook, you will 
	suppress normal handling of the event:
		/on ^raw_irc_bytes * {echo nothing further happens}

EPIC5-1.4

*** News 08/25/2015 -- Improved automargin support 
	You can now use automargins to get better wrapping of long urls.

	1. Use a terminal emulator that supports automargins
	   (they pretty much all do)
	2. Set your TERM env variable to something that supports automargins
		export TERM=vt102am        
	   should do the job
	3. Restart EPIC after you've updated the TERM.  It's not enough 
	   to just change the TERM and re-attach screen.  It's a good 
	   idea to check this when you're upgrading.
	4. /SET -CONTINUED_LINE	
		to get rid of the + thingee
	5. /SET FIRST_LINE »    
		or something if you don't use /set output_rewrite 
		to prefix every line
	6. /SET WORD_BREAK<space><space><enter>
		URLs contain commas and dots and semicolons, and you 
		don't want epic to word break on anything other than 
		a space.

	That should do it!  Your display will now use the final column
	on the display, and urls should be unmangled when you copy them

	If you "forget" to /SET -CONTINUED_LINE or /SET WORD_BREAK and want 
	to rebreak your windows in order to take advantage of this after 
	the fact, you can always just do /window rebreak_scrollback.  

	*** IMPORTANT! ***
	Note that you _must_ be running with a TERM supporting 
	automargins or this will not change things!

	You can check this by doing /eval echo $getcap(TERM enter_am_mode)
	If it returns blank, then your TERM does not support automargins.
	*** IMPORTANT! ***

*** News 08/25/2015 -- New /SET, /SET FIRST_LINE
	For those of you who use /SET OUTPUT_REWRITE to prefix every line
	of output with something (like a timestamp), you can ignore this.

	If you /SET FIRST_LINE, the string will be prefixed before every
	logical line of output.  This is great if you /SET -CONTINUED_LINE
	so you can continue to tell what lines are what.

EPIC5-1.2 
EPIC5-1.1.11

*** News 07/20/2015 -- New operation: @serverctl(SET refnum UMODE ...)
	You've never been able to SET your UMODE, becuase that never
	made much sense.  But it was pointed out that the UMODE is used
	when you reconnect to establish your initial usermode, and they
	wanted to be able to control that.

	So now, when the server is disconnected, you can change its umode,
	which will be used when you next connect.  Try something like this:
		on server_lost * {defer @serverctl(SET $0 UMODE i)}

*** News 07/09/2015 -- Don't do /redirect @W<refnum> <command>
	You can /msg @W4 <stuff> for example to do an /xecho -w 4 <stuff>.
	But you can't use this with /REDIRECT because the redirection 
	itself causes another redirect, and it just gets stuck in an 
	infinite loop.  The client can't protect you from doing this
	without a rewrite, so, don't do this. ;-)

*** News 07/09/2015 -- New flag to /ENCRYPT: /ENCRYPT -REMOVE
	It was confusing to remove /encrypt's before -- you had to specify
	all the arguments but not the password:
		/ENCRYPT hop -blowfish
	And if you had a PROG crypto, you couldn't remove it at all!
		/ENCRYPT hop password program...
	(How do you not specify the password in this case?)

	Anyways, there is now /ENCRYPT -REMOVE which lets you unambiguously
	remove an encrypt for a target
		/ENCRYPT -REMOVE hop

*** News 07/09/2015 -- Only one /ENCRYPT per target now.
	Traditionally, ircII has only had one cipher type for /ENCRYPT.
	EPIC added more cipher types along the way, and it was possible
	to set up multiple /ENCRYPT sessions for the same person.
	However, as I reflect upon this, this isn't a reasonable thing to
	do, because if you do
		/ENCRYPT hop -blowfish password1
		/ENCRYPT hop -aessha password2
	And then you /msg hop, which one should it use?

	So I've changed it so when you change the encryption type (such as
	in the 2nd line above), it will REPLACE the first one -- you will 
	only be able to have one cipher session per target.

	If this is a problem -- if I broke something for you, please let me
	know so we can address your needs.  

*** News 04/14/2015 -- New function, $chankey(servref #channel)
	The $chankey() function returns the channel for a specified channel.
	I created this because $key() doesn't allow you to specify
	'servref' but rather uses from_server, which means you have to
	wrap it in an /xeval -s to use a non-default server. ick.

	Arguments:
	 $0	- A server refnum
	 $1	- A channel name 

	Return Value:
	 empty string - Either 1.) 'servref' not provided, or 
			       2.) '#channel' not provided, or
			       3.) You're not on '#channel' on servref, or
			       4.) #channel doesn't have a key
	 anything else - The mode +k key for #channel on servref.

*** News 04/14/2015 -- SSL info available via $serverctl(GET refnum SSL*)
	You can now get information about live SSL connections:

	$serverctl(GET refnum SSL_CIPHER)
		The encryption being used, something like "DHE-RSA-AES256-SHA"

	$serverctl(GET refnum SSL_VERIFY_RESULT)
		0 if the certificate was verified successfully.
		Any other value if it did not.  
		These values match up to the verify(1) man page.
		Most notable, error code 20 means that OpenSSL could not find
		your local CA file (see /SET SSL_ROOT_CERTS_LOCATION below)

	$serverctl(GET refnum SSL_PEM)
		This is the PEM (base64) format of the server's certificate.
		You could save this to see if it's changed. ;-)

	$serverctl(GET refnum SSL_CERT_HASH)
		This is the SHA1 digest of the server's certificate.
		It is converted into a byte string like AB:CD:EF:01:02:...

	$serverctl(GET refnum SSL_PKEY_BITS)
		This is the number of bits that the server's certificate
		said that the server's public key uses.

	$serverctl(GET refnum SSL_SUBJECT)
		This is the hostname of the subject of the certificate.
		In theory, this is supposed to be the server's hostname.
		This could be a wildcard string.

	$serverctl(GET refnum SSL_SUBJECT_URL)
		This is the SSL_SUBJECT, but passed through URL encoding.
		It's useful because the SSL_SUBJECT will have spaces, and
		this results in just one word.  

	$serverctl(GET refnum SSL_ISSUER)
		This is the Certificate Authority (CA) that issued the 
		server's certificate.

	$serverctl(GET refnum SSL_ISSUER_URL)
		This is the SSL_ISSUER, but passed through URL encoding.
		It's useful because the SSL_ISSUER will have spaces, and
		this results in just one word.

	$serverctl(GET refnum SSL_VERSION)
		This is the version of SSL you're using.  
		It should either be TLSv1 (good) or SSLv3 (bad).

	With all of the above information, I hope someone scripts a nice
	SSL executive script that caches the certificate information, 
	tells you whether the connection should be trusted, decides whether
	the ssl version is ok, the public key bits are ok, all that stuff.

*** News 04/10/2015 -- New /TIMER argument, /TIMER -SNAP
	A "snappable" timer fires off at the "top of the interval".
	That means it runs every time ($time() % <interval> == 0)
	If you snap to 60, it will run at the top of every minute,
	just like mail checking, clock updating, etc.  If you snap 
	to 3600, it will run at the top of every hour.

	Example:
		/timer -snap -repeat -1 -refnum hourly 3600 {
			echo I run at the top of every hour
		}

*** News 04/10/2015 -- New script, /LOAD find_ssl_root_certs
	This script is loaded by /load global, and you should load it 
	too, if you're not using /load global; or you should implement
	a similar functionality to get /SET SSL_ROOT_CERTS_LOCATION pointing
	to the right place for you.  Otherwise, your SSL certificates
	won't authenticate, and $4 in /on ssl_server_cert will always 
	be 0, even if the cert is actually legitimate.  Or maybe all
	of what I just said doesn't matter to you.

*** News 04/10/2015 -- New /SET, /SET SSL_ROOT_CERTS_LOCATION
	In order for SSL to verify certificates, it needs to have a copy
	of the root certificate authorities.  This is usually a file
	named "ca.bundle" or "ca-root-nss.crt".  You need to /set this
	variable to wherever your openssl compatable root ca authority
	certificates are.  It would help if I understood what I'm talking
	about more.  Anyways, the script /load find_ssl_root_certs
	tries to help you with this.

*** News 04/10/2015 -- Enhancements to /ON SSL_SERVER_CERT
	Apparently I've never documented /on SSL_SERVER_CERT.
	
	The /ON SSL_SERVER_CERT hook is thrown every time a successful
	connection to an SSL server is made.  For now, the only SSL 
	connections are to IRC servers, but some day I hope to support
	DCC as well.  For now, this refers only to server connections.

	  $0 - File Descriptor (need a way to convert to server refnum)
	  $1 - The "subject" of the certificate  -- the server name
	  $2 - The "issuer" of the certificate
	  $3 - How many bits are used by the certificate's public key
	  $4 - Did the certificate validate?
		0 = pass, anything else = fail.
		(For now, this the result of X509_get_verify_result())
		(This depends on /SET SSL_ROOT_CERTS_LOCATION (above))
	  $5 - What SSL type are we using? (TLSv1 or SSLv3)
	  $6 - What is the digest of the SSL Certificate?

	The idea is you could use $1 to cache the metadata about a 
	server, and use $2, $3, $4, $5, and $6 to see if anything
	changes from one connection to the next.

	Probably more additions will come later.  I'm especially interested
	in passing in the complete plain text certificate +url'd up.

*** News 04/10/2015 -- More robust certificate verification for SSL
	Based on a paper written by Roca He, who is doing a research
	project on improper use of OpenSSL API by open source software,
	the OpenSSL code in epic was reviewed and enhanced.  One point
	of interest was certificate verification -- epic wasn't doing
	any of that.  But now it is.  This requires OpenSSL to know
	where your root/trusted certificate authorities are, and there
	are more notes above about how to handle that.  The results of
	this verification are reflected in /on ssl_server_cert above.

*** News 04/10/2015 -- You can now /encode to /EXEC processes 
	The /EXEC system is now UTF-8 aware, and you can use the 
	/encoding command to recode between %procs targets now. yay!

	Example:
		/encoding %nonutf8prog iso-8859-15
		/exec -name nonutf8prog myprog
		<output from 'myprog' treated as iso-8859-15, 
		 converted to utf8 for epic's use>

*** News 04/10/2015 -- New scripts: /load sasl_auth, userlist, tmux_away
	Zlonix wrote these scripts.  I need to write blurbs about each.
	Until that time, read the scripts, they're well documented!

*** News 07/24/2014 -- New feature $windowctl(REFNUMS_ON_SCREEN <winref>)
	The $windowctl(REFNUMS_ON_SCREEN <winref>) will return all of the
	refnums on the screen that contains window <winref>.  They are
	returned in SCREEN ORDER, ie, from top to bottom.  

	This was because someone wanted to make the bottom window ONLY 
	double status bar, so he needed to know which one was on bottom 
	and which ones weren't.

	If <winref> is a hidden window, then it will return all of the 
	invisible windows, but in no guaranteed order.

	If <winref> is 0, then it will return the screen for the current
	window, of course.

	You MUST specify a window refnum of some sort, even if it's just 0.

*** News 04/19/2014 -- Support for tmux for /WINDOW CREATE
	If you run EPIC under tmux, you can now use /window create and it
	will create new screens running under other tmux screens, just like
	it does for gnu screen.  There is also /set tmux_options, but I did
	not really test that.  What EPIC does is run this command:

	  tmux new-window "<wserv_path> <tmux_options> localhost [port]"

*** News 04/17/2014 -- /SET TRANSLATION now retired
	The /SET TRANSLATION feature which has served us well for many
	years is now superceded by /ENCODING, and has been retired.

EPIC5-1.1.10
EPIC5-1.1.9

*** News 04/16/2014 -- $fix_width() now fully works, and UTF-8 aware.
	The $fix_width() function takes the following arguments:
		cols      $0    Number of display columns
		justify   $1    Justification ("l" left, "c" center, "r" right)
		fillchar  $2    Fill character (can be utf8 cchar)
		text      $3-   
	This fully supports UTF-8, so the result is a string that will
	take up "cols" columns, even if "fillchar" takes multiple columns.


*** News 04/16/2014 -- Many functions are now UTF8 aware
	These functions are now fully UTF8 aware.  This means that 
	their unit of operation is a unicode character, and not a byte.

		after		before		center		chop		
		chrq		curpos		fix_width	index		
		indextoword	insert		left		maxlen
		mid		msar		pad		pass
		rest		reverse		right		rindex
		rsubstr		sar		split		strip
		strlen		substr		toupper		tolower
		tr		wordtoindex	

	These things are also UTF-8 aware:
		/XTYPE -L
		$[num]VAR		(pad/truncate $var to num places)
		/FEC

	Additionally, case sensitivity is UTF8 aware, for all languages,
	not just English. (at least as far as I tested)


*** News 04/11/2014 -- New function, $encodingctl()
	The $encodingctl() gives you a lower level interface to the 
	encoding system.  

	The behavior of $encodingctl() is ugly and I regret several of
	the decisions I've made already, but that's the way it goes...

	As with other $*ctl() functions, if there was not information in
	the argument list to decide what you wanted to do, it will return
	the empty string.

	- $encodingctl(REFNUMS)
	Return all recode rule refnums.

	- $encodingctl(MATCH servref sender receiver)
	Decide which recode rule would be used for a message sent by
		"sender" to 'receiver' over the server 'servref'.
	If you are the sender, use $servernick().
	Return value:
	 empty_string - an argument is missing, or servref is not an integer
	 anything else - the rule that would be used.

	- $encodingctl(GET refnum <OPERATION>)
	Get an attribute of a recode rule:
	  -> Returns empty string if <refnum> is not a valid recode rule
	  -> Returns empty string if no <operation> specified.

	  - $encodingctl(GET refnum TARGET)
	  Return the complete "target" part of the rule; this is whatever
	  you passed to the /encoding command.

	  - $encodingctl(GET refnum ENCODING)
	  Return the complete "encoding" part of the rule; this is whatever
	  you passed to the /encoding command.

	  - $encodingctl(GET refnum SERVER_PART)
	  Return the 'server part' of the target.  This is the part before
	  the slash, or the empty string if there is no server part.

	  - $encodingctl(GET refnum TARGET_PART)
	  Return the 'target part' of the target.  This is the part after
	  the slash, or the empty string if there is no target part.

	  - $encodingctl(GET refnum SERVER_PART_DESC)
	  This returns nothing for now.  Maybe someday it will return a
	  server description (ie, host:port:...)

	  - $encodingctl(GET refnum MAGIC)
	   1 if this rule is a "system rule" and cannot be deleted.
	   0 if this is a user rule, and can be deleted.

	  - $encodingctl(GET refnum SOURCE)
	   1 - Set at boot-up by using your locale (CODESET)
	   2 - Set at boot-up from hardcoded defaults
	   3 - Set by the user

	- $encodingctl(SET refnum <OPERATION>)
	Change an attribute of a recode rule
	  -> Returns empty string if <refnum> is not a valid recode rule.
	  -> Returns empty string if no <operation> specified.

	  - $encodingctl(SET refnum ENCODING new-encoding)
	    Empty String - New-encoding was not specified
	    0 - Changed: The new encoding was set successfully
	   -1 - Not changed: The new encoding does not exist on your system
	   -2 - Not changed: The new encoding does not convert to UTF-8
	   -3 - Changed: The new encoding PARTIALLY converts to UTF-8

	- $encodingctl(DELETE refnum)
	Delete a recoding rule:
	 Empty String - <refnum> was not a valid recode rule.
	 0 - <refnum> is a magic rule and may not be deleted
	 1 - <refnum> was successfully deleted.

	- $encodingctl(CHECK encoding)
	Determine whether or not <encoding> could be used in recoding rules:
	  Empty String - <encoding> was not specified.
	  0 - Acceptable: The encoding is acceptable for use
	 -1 - Unacceptable: The encoding does not exist on your system
	 -2 - Unacceptable: The encoding does not convert to UTF-8
	 -3 - Partially Acceptable: The encoding PARTIALLY converts to UTF-8

	- $encodingctl(CREATE target encoding)
	Basically the same thing as /encoding target encoding
	Returns the refnum of the new rule.

EPIC5-1.1.8

*** News 03/11/2014 -- New command, /ENCODING
	The /ENCODING command is not really new, but it finally is in its
	final form.

	With /ENCODING you can specify rules that tell epic what encoding
	you think other people are using.  Whenever epic receives a non-utf8
	message, it will evaluate the rules to decide what encoding it should
	treat the non-utf8 message.  Whenever you send an outbound message
	to irc, epic will use the rules to decide if it should encode it 
	in something other than utf-8.

	This means you can talk to non-utf8 users, and their messages can
	be made utf8 for you; and your (utf8) messages can be non-utf8 for
	them.  This is full end-to-end recoding support.

	The rules look like this, and are evaluated with this priority:
		6. /ENCODING server/nickname
		5. /ENCODING nickname
		4. /ENCODING server/channel
		3. /ENCODING channel
		2. /ENCODING server
		1. /ENCODING irc		(the "magic" rule)

	In this case, "server" is anything that can be recognized:
		* A server refnum
		* A server "ourname"
		* A server "itsname"
		* A server group
		* Any server altname

	The client will evaluate each rule, and the "best match" is the
	first rule that lands highest on that first list.  Hopefully it
	should just be natural.  An example:

		# All "efnet" servers use ISO-8859-1	(level 2)
		/encoding efnet/ ISO-8859-1

		# Except #epic, which uses CP437	(level 3)
		/encoding #epic CP437

		# Except zlonix, who uses KOI8-R	(level 5)
		/encoding zlonix KOI8-R

	So if you get something non-utf8 message over an "efnet" server,
	it will be assumed to be ISO-8859-1.  Unless that message was 
	sent to #epic -- then it is assumed to be CP437.  Unless that 
	message was sent by zlonix, then it is KOI8-R.  In this way, you
	can set defaults for channels and overrule it by individual person.

	SYNTAX:
		If you do	/ENCODING <stuff>

	If <stuff> is a channel, then <stuff> is treated as a channel.
	If <stuff> is a number, then <stuff> is treated as a server refnum.
	If <stuff> contains a slash, then anything before the slash is the
		server part, and anything after the slash is the channel
		or nickname part.  *You can use a trailing slash to make
		it unambiguous you mean a server, or a leading slash to
		make it unambiguous you mean a channel/nickname.*
	If <stuff> contains a dot, then <stuff> is treated as a server.
	Otherwise, anything else is treated as a nickname.

	
*** News 03/06/2014 -- $cparse(%X) turns into a ^X
	You can use %X in $cparse() to inject a ^X which might make it 
	easier to handle 256 color support.  All the rules below still apply.

		/echo $cparse(%kone %rtwo %X80buckle %XFFmy %X32shoe)

*** News 03/05/2014 -- 256 color support (^X works like ^C)
	The ^X attribute allows you to set 256 colors (if your emulator
	supports that).

	The ^X attribute takes two hex digits to indicate a color between
	00 and FF (0 to 255).

		^X-1			Turn off color
		^X00			Turn on fg color 0
		....			....
		^XFF			Turn on fg color 255
		^X<number>,<number>	Turn on <fg>,<bg> colors
					The <fg> number can be omitted.

	The ^X attribute ALWAYS takes stuff after it.  You cannot use a naked
	^X or you risk forwards incompatability.  I *will* be adding more 
	stuff to ^X in the future so don't develop bad habits.

	Caveat:
	  256 color support isn't "standard" ansi so the client sends the 
	  hardcoded sequence ^[[38;5;<number>m  to your terminal.  If your 
	  terminal does not honor this way of doing 256 colors, then there's 
	  not much you can do about it...

*** News 03/05/2014 -- Italics support
	The highlight character ^P now toggles the "Italic" setting of
	your terminal emulator.  Mine doesn't support this so I couldn't
	test it very well.  Please report any bogons if you use it.

*** News 03/02/2014 -- Clarified behavior for /set lastlog 0
	It was pointed out that /set lastlog 0 did not do a reasonable
	thing with the unified scrollback buffer, so the behavior has
	been refined a bit.  

	Here is how /set lastlog <X> now works
	1. For each window, set /window lastlog <X>.
	2. For each window, rebuild each window's scrollback 
	   -- Which may throw away stuff!  
	   -- If you do /set lastlog 0, it throws away all scrollback
	      and does an implicit /window clear!
	3. For each window, if <X> is less than twice the window's size,
	   /window lastlog <twice its size> (24 lines -> /window lastlog 48)
	4. The final value of <X> will be twice the size of the biggest window.

*** News 02/14/2014 -- New flags, /LASTLOG -THIS_SERVER and -GLOBAL
	The /LASTLOG -THIS_SERVER flag will show all lastlog entries
	from any window belonging to the server server as this window.
	IE, it is a /lastlog that catch all of this server.

	The /LASTLOG -GLOBAL flag will show all lastlog entries from
	any window whatsoever.

*** News 02/11/2014 -- Auto-detect incorrect encodings lead to warnings
	If you have /ENCODING CONSOLE set to non-utf8, and then you type
	stuff that looks like UTF8, the client will tell you and suggest
	you switch.  This will end the problem with utf8 users seeing
	multiple garbage characters on the input line.

	If you have /ENCODING CONSOLE set to utf8 and you type something
	that is not utf8, the client will tell you and suggest you switch
	to something else.  Unfortunately it's not easy to know what you 
	are using, so it suggests ISO-8859-1.  

	If you are correctly setting LC_ALL (see below) then the above
	should never happen for you.

*** News 02/11/2014 -- Now honoring LC_ALL (locale charset settings)
	If you set your character set via locale environment variables,
	EPIC will now use your locale as the default character set for
	/ENCODING console.  If you do not set your locale variables,
	then epic will continue to default to ISO-8859-1.

*** News 02/11/2014 -- New /ENCODING target "scripts"
	Whenever you /load a script, epic needs to convert it into utf8.
	The normal way a script can declare itself is via /load -encoding
	(See the note from 11/17/2012)

        if (word(2 $loadinfo()) != [pf]) { load -pf -encoding CP437 $word(1 $loadinfo()); return; };

	If a script is not well-formed utf8 and it does not declare its
	own encoding, then it will be assumed to be whatever the value
	of /ENCODING scripts is.  The hardcoded default is "CP437".

	Naturally, if you /load a script that is not utf8 and is not
	CP437, it may not translate correctly.  But it seems most scripts
	use CP437, and we'll get everybody to declare/utf8-ify their scripts.

*** News 02/10/2014 -- EPIC users now utf8 stransparant to irc.
	As of right now, whether you are using utf8 or not, anything
	you send from epic will be sent to irc as UTF8.  Anything UTF8
	that anybody sends you will be displayed properly on your screen,
	even if you are not using UTF8.

*** News 02/10/2014 -- New command /ENCODING -- declare target encodings
	The new command /ENCODING is used to declare what string encoding
	a target is using.  At some point this will spawn into an all-
	encompassing feature, but for now, it's just used to declare the
	encoding of your console.

		/ENCODING console ISO-8859-1
	or	/ENCODING console UTF-8		(default)

	If EPIC detects that your input is illegal for the encoding you
	are using, it will ask you to change it.  If the stuff you type
	is not what you think you're typing, again, you might be using
	the wrong encoding.

*** News 02/09/2014 -- Unicode support for $chr(), new func $unicode()
	The $chr() function will now accept unicode descriptors
		$chr(U+0415 U+0420 U+20)
	The $unicode() function converts text to unicode descriptors
		$unicode(Ð) returns "U+0423"

*** News 02/08/2014 -- New server flag, "encoding"  -- WITHDRAWN
	Server descriptions now have an extra field "encoding" which is 
	used when you receive a non-utf8 string from the server.

	When you receive a non-utf8 string from the server, epic will 
	assume it is in this encoding and use iconv() to convert it to utf8.

	The default is "ISO-8859-1" for no particular reason.
	This will be supplanted by a /recode command in the future!

	*** This feature has been removed.  Do not use! ***

EPIC5-1.1.7

*** News 01/16/2014 -- New scripts (should document these!) from Zlonix
	   xmsglog	Encrypted logfiles
	   sasl_auth	SASL support (for some networks)
	   idlealert	Monitor friends' idle times (with lots of WHOISs)

*** News 01/02/2014 -- New status expando, %{4}S, full "itsname"
	Just to run this down, here are the %S expandos
		%S	Altname 0 (default: Shortened "ourname")
			(Only shown when you're connected to multiple servers)
		%{1}S	Altname 0 (default: Shortened "ourname")
		%{2}S	Full "ourname"
		%{3}S	Server Group
		%{4}S	Full Server "itsname"

*** News 01/02/2014 -- Add /input -- so you can stop arg processing
	If you wanted to be able to prompt starting with a hyphen, well,
	you couldn't do that before.  But now -- is honored and everything
	else is taken as the input prompt.

*** News 09/12/2013 -- New built in function $status_oneoff()
	This is a completely experimental function right now, which is
	helping me decouple the status bar generation from the windows.

	This function allows you to create your own status bar string,
	if you provide it a window and a status_format.
		$status_oneoff(winref ...status goes here...)
	As a simple example,
		$status_oneoff(1 %S)
	would return what %S would be on window 1.

EPIC5-1.1.6

*** News 07/31/2013 -- New action $LOGCTL(LAST_CREATED)
	The $logctl(LAST_CREATED) returns the log refnum of the most recent
	log that was created with /LOG NEW or $logctl(NEW).

*** News 07/31/2013 -- New action $LOGCTL(NEW)
	The $logctl(NEW) performs a /LOG NEW and returns the refnum of the
	newly created log.

*** News 07/31/2013 -- New /lastlog flag.
	/lastlog -regignore [regular-expression] avoids printing lines that
	would otherwise be printed without the regex.  Can be used in
	combination with -regex and -ignore and the other flags.

*** News 07/28/2013 -- $windowctl(REFNUMS_BY_PRIORITY) returns by current-ness
	The $windowctl(REFNUMS_BY_PRIORITY) operation returns all windows in
	the descending order that they have been the "current window". 

	This is based on your input screens -- if you have multiple windows 
	connected to multiple servers, this list doesn't care about that.  
	If you need that, iterate over the list and filter out the ones 
	for your server:

	fe ($windowctl(REFNUMS_BY_PRIORITY)) x { 
		if (windowctl(GET $x SERVER) == serverctl(FROM_SERVER)) {
			push results $x
		}
	};
	xecho -b Windows for this server in order of current-ness: $results


*** News 07/28/2013 -- FIXED-SKIPPED windows don't get channels on /window kill
	FIXED-SKIPPED windows (ie, /window fixed on skip on) are used to create
	status windows (see below).  They will no longer be given channels 
	from another window that is killed unless it is the last window 
	connected to the server.

*** News 01/09/2013 -- New /QUEUE flag, -RUNONE
	I can't believe I didn't think of this before!
	The /QUEUE -RUNONE flag will run the first command in a queue,
	leaving the rest of the queue alone.  This will work great with
	timer to create a FIFO queue that you can stagger commands through.
	For example, a command that slows down output to the server

		/TIMER -REPEAT -1 2 {QUEUE -RUNONE serverqueue}
		fe (#one #two #three #four) x {
			QUEUE serverqueue {join $x}
		}

EPIC5-1.1.5

*** News 11/28/2012 -- Lots of code quality improvements
	Ancient graciously set up epic to run under clang and its static
	analyzer, and we found lots of suggestions of things to fix.  

*** News 11/17/2012 -- New flag, /load -encoding
	You may now specify what a file's encoding is, and it will be
	converted automatically to utf8 (there will be a /set for this
	soon enough).  You can use this in your magic bootstrap:

	if (word(2 $loadinfo()) != [pf]) { load -pf -encoding iso-8859-1 $word(1 $loadinfo()); return; };

	This allows utf8 terminal users to load ascii art in 8859, and 
	it will Just Work!

EPIC5-1.1.4

*** News 8/5/2012 -- Anti-foot-shooting for $pad() and $repeat()
	Some had mentioned that you shouldn't be permitted to shoot yourself
	in the foot by asking for absurdly large output strings in $pad()
	and $repeat().  Normally I wouldn't agree to that, but I guess I'm
	getting soft in my old age....

*** News 8/5/2012 -- /xdebug no_color	- turn off all color unconditionally
	The experimental feature /xdebug no_color turns off color support
	at the lowest level of the client.  If you refresh your screen,
	any previously displayed color will be suppressed.  Turning off 
	this feature allows any color to be shown again.

*** News 8/5/2012 -- /LASTLOG -CONTEXT actually works correctly
	The /LASTLOG -CONTEXT feature shows you some lines before and after
	any lastlog match.  This has previously been broken and as of the
	time I write this, works properly, both normal and -REVERSE.

*** News 8/5/2012 -- /ON SET only thrown once when you type the exact name
	Previously, if you typed /SET <X> where <X> is the exact name of 
	any builtin SET, then /on set would be thrown twice.  That was never
	the intention, and this has been "fixed".

*** News 6/26/2012 -- Merge two windows together -- /WINDOW MERGE otherwin
	/WINDOW MERGE is like /WINDOW KILL except it moves everything from
	the current window to another window first.  This allows you to 
	"merge" two windows into one window.
	  * Window output
	  * Channels
	  * Logfiles
	  * Queries
	  * Timers
	If the current window can't be KILLed then everything will be moved
	away anyways, but you'll get an error message telling you that it
	can't be killed.  This isn't a bug.

*** News 6/26/2012 -- Expiring output -- /XECHO -E
	The /XECHO -E flag lets you create "expiring output" which will 
	disappear after however many number of seconds.
		/XECHO -E 10 This goes away in 10 seconds!
	This might be useful for status windows that you want to show new
	messages briefly.

*** News 6/24/2012 -- New $hookctl(CURRENT_IMPLIED_HOOK)
	When an implied /on hook is being expanded,
	$hookctl(CURRENT_IMPLIED_HOOK) is set to the name of that hook.

	I recommend wrapping this in an alias:
		alias ih {return $hookctl(CURRENT_IMPLIED_HOOK)
	Then you can use $ih() to get the hook.

	The use case is if you are using the same function for different
	implied hooks -- there was no way to tell the function which one
	it was working on.

*** News 6/24/2012 -- New $dccctl(SET refnum FULL_LINE_BUFFER [0|1])
	You can now set a dcc raw to "fully line buffered" mode.
	When this is turned on, /on dcc_raw will not trigger until
	a complete line is available.  You can turn this off by setting
	it to 0. 

	The corresponding $dccctl(GET refnum FULL_LINE_BUFFER) also works.

*** News 6/24/2012 -- New $dccctl(SET refnum PACKET_SIZE <bytes>)
	You can now set a dcc raw to "fully packet buffered" mode.
	When this is turned on, /on dcc_raw will not trigger until
	<bytes> bytes are available.  You can turn this off by setting
	it to 0. 

	The corresponding $dccctl(GET refnum PACKET_SIZE) also works.

*** News 06/24/2012 -- New option, /XEVAL -NOLOG 
	The -NOLOG option to /XEVAL suppresses logging for the command.
	The person who requested wanted to do something like this:
		alias ll { xeval -nolog {lastlog $*} }
	to be able to avoid logging /lastlog output.

*** News 06/24/2012 -- New option, /LASTLOG -IGNORE <pattern>
	The /LASTLOG -IGNORE <pattern> option allows you to display all of
	your lastlog EXCEPT whatever matches <pattern>.  In this way, it 
	acts as a reverse to the normal way.

EPIC5-1.1.3

*** News 03/24/2012 -- New status bar expando, %G (Network)
	The %G status bar expando shows the 005 NETWORK value for your server

*** News 06/09/2010 -- New semantics for /BIND TRANSPOSE_CHARACTERS
	The TRANSPOSE_CHARACTERS keybinding now has the following semantics:
	1. When the cursor is on the first character, swap the first and second
	   characters.  
	2. When the cursor is on a character (but not the first character), swap
	   the character under the cursor with the character before the cursor.
	3. When the cursor is at the end of the line (and not on a character), 
	   swap the last two characters on the input line.
	In all three cases, the cursor stays in whatever column it is in.

*** News 06/05/2010 -- New script: rejoin
	Stores channel/key on disconnect/part/kick. I hope it's useful!

	Allows you to rejoin all channels lost in a disconnect, by doing:
	/rejoin -all OR /rejoin -server

	See script for details. 

EPIC5-1.1.2

*** News 04/15/2010 -- New flags to $sar(), $msar(), case sensitivity
	In EPIC4, $sar() and $msar() were case sensitive.
	You could turn this off by using the 'i' flag.
	In EPIC5, $sar() and $msar() are case *INSENSITIVE*
	There has been no way to turn this off!
	You can now turn this off with the 'c' flag.

	Example:
		$sar(g/One/Two/one One one One)   -> "Two Two Two Two"
		$sar(cg/One/Two/one One one One/) -> "one Two one Two"

*** News 04/15/2010 -- New /on, /on unknown_set
	As a favor to howl, I've added /on unknown_set, which will be hooked
	whenever /set is called on a set that doesn't exist.
		$0  - The set that doesn't exist
		$1- - The value the user wanted to set.
	If you catch this, then the /on set that triggers for "unknown-set"
	will not be thrown.  If you don't know what I'm talking about, then
	you won't miss it.

*** News 04/01/2010 -- Can now backslash colons in server passwords
	Previously it was impossible to include colons in server passwords
	because colons are delimiters in server descriptions.  Now you can 
	backslash the colon and it will do the right thing.  Don't forget to
	backslash your backslashes!

		Real password		What you should use:
		-------------------	---------------------
		onetwothree		onetwothree
		one:twothree		one\:twothree
		one\two:three		one\\two\:three

*** News 03/25/2010 -- Can now modify servers by refnum (Fix to server descs)
	The /server command was broken in the epic5-1.1.1 release, and got 
	some extra work for the next release.  As part of this work, you can 
	now add change fields to a server refnum, like so:
		/server 1:type=irc-ssl
	Previously refering to a server refnum didn't support change fields.

EPIC5-1.1.1

*** News 3/19/2010 -- EPIC5-1.1.1 was released here

*** News 3/19/2010 -- The last value of /WINDOW SERVER is saved per window
	The last argument passed to /WINDOW SERVER is saved on a per-window
	basis, via $windowctl(GET x SERVER_STRING).  I added this because
	howl asked for it, although I don't know what he intended it for.

*** News 3/19/2010 -- Modifying server descriptions on the fly
	You may now modify server descriptions on the fly in the
	following situations:
		/SERVER -ADD <desc>
		/SERVER -UPDATE <desc>
		/SERVER <desc>
		$serverctl(READ_FILE filename)
		$serverctl(UPDATE refnum stuff)
		/WINDOW SERVER <desc>
	For example, let's say you created a server irc.foo.com, but
	you forgot that it used SSL.  Before it was a pain to "fix" that,
	but now you can fix it like this:

		/SERVER -ADD irc.foo.com:8855
	(oops, it uses ssl, i forgot!)
		/SERVER irc.foo.com:type=irc-ssl
	(aha! okie. now it will connect using ssl)
	
*** News 3/19/2010 -- You can log everything with /LOG SERVER ALL
	If you create a log like:
		/LOG NEW FILE myirc.log SERVER ALL ON
	that will log everything.
	Previously, you had to add each server individually by 
	refnum, but now you can just use the magic string "ALL"
	to refer to all servers.
