1EPIC5-2.2
2
3*** News 10/06/2021 -- EPIC5-2.1.6 (1981 - Impignorate) released Here
4
5*** News 09/21/2021 -- Another round of clang static analysis
6	Somewhere around here we did another round of static analysis
7	with clang's analyzer, and fixed whatever it recommended.
8
9*** News 09/19/2021 -- "reconnect" script has been reimplemented
10	The reconnect script has been renamed to "reconnect.orig".
11	If you want the original behavior, just /load reconnect.orig
12	The new script is based on improvements we've made in epic5
13	to make reconnection logic more reliable and dependable.
14
15*** News 09/11/2021 -- New option,  $serverctl(GET x PADDR)
16	The $serverctl(GET x PADDR) returns the server's presentation
17	address.  This is "1.2.3.4" for ipv4, or "2600::1" for ipv6.
18	This represents the IP address we're connected to.
19
20*** News 09/11/2021 -- New /window operation, /WINDOW CLEARREGEX <regex>
21	This was requested by Zlonix.
22
23	The /WINDOW CLEARREGEX <regex> operation removes all items from
24	the window's lastlog whose text (what you see on the screen)
25	matches the <regex>.  Removing them from the lastlog removes
26	them from the scrollback and your screen as well.  This is useful
27	for making conversations with annoying bots go away retroactively.
28	Example:	/window clearregex annoybot
29
30*** News 09/11/2021 -- New /ON, /ON RECONNECT_REQUIRED
31	The /ON RECONNECT_REQUIRED hook is thrown by the client when it
32	feels that a reconnection intervention is appropriate.
33	We are going to start this small, and build in more use cases
34	as we go forward.
35
36	  1. When server is in ACTIVE state and the socket dies
37	  2. When a write to the server fails
38
39	In these situations, your script should take whatever measures
40	are necessary to save the state of windows, channels, etc,
41	in preparation for the upcoming disconnection.
42
43	This /ON is thrown while the server is in a state of chaos.
44	The internal state of the system is wrong, and you must assume
45	that the connection to the server has already been lost.
46
47	YOU MUST _*_*_NOT_*_*_ try to do anything clever in this /on.
48	If you have this idea of moving windows or servers or channels,
49	please don't!  I recommend setting up /timer's and /defer's so
50	you can do those sorts of changes away from the blast radius.
51
52	YOU MUST _*_*_NEVER_*_*_ attempt to do any direct intervention
53	in this /on -- instead, you should save information and create
54	a timer to deal with the problem later.  YOU HAVE BEEN WARNED.
55
56	/ON RECONNECT_REQUIRED currently provides this information
57		$0 	The server that unexpected failed on us.
58			Reconnection will be required.  Remember,
59			you cannot do reconnection in the /on, you
60			have to schedule it to happen "later"
61
62*** News 09/08/2021 -- New /window operation, /WINDOW CLEARLEVEL [levels]
63	This was requested by Zlonix.
64
65	The /WINDOW CLEARLEVEL [levels] operation removes all items from
66	the window's lastlog of the levels you specify.  Removing them
67	from your lastlog removes them from your screen as well.  This is
68	useful for making noise go away retroactively
69	Example:	/window clearlevel joins,parts,quits,kicks
70
71*** News 09/08/2021 -- New statement type: block-with-arglist
72	The ircII syntax now supports a new statement type, which I'm
73	calling a "block with arglist"
74
75		(arglist) {block}
76
77	You could also think of this as an "inline anonymous function".
78	For the purposes of the statement, $* is modified by (arglist)
79	and then {block} is run.
80
81	Please note there are several caveats to this:
82	  1. Arglist is not magic, it is syntactic sugar.  So it creates real
83	     local variables, and those local variables have their ordinary
84	     scope.  So they will persist after the end of the statement.
85	  2. The statement only modifies $* during the statement itself.
86	     So after {block} is run, $* goes back to what it was originally.
87	  3. Note that this is a *statement* and not a *block* so if you are
88	     working with something that expects a block, wrap it in {}s to
89	     create a block.
90		if (# == 3) {(arg0, arg1, arg2) {... code ...}}
91	  4. Arglist processing isn't "free" so doing it in a tight loop will
92	     be slower than doing it outside of the loop
93
94*** News 09/07/2021 -- Pass window refnum in /ON CHANNEL_LOST
95	The /ON CHANNEL_LOST hook now provides the window that a channel
96	was in as $2
97		$0 - The server refnum of a channel
98		$1 - The name of a channel
99		$2 - The window refnum of a channel
100
101*** News 09/06/2021 -- Functions for JSON document handling
102	Some time ago some new functions appeared for handling
103	JSON documents, but they were not documented.  So now
104	I am going to document them!
105
106	CONVERTING JSON DOCS TO /ASSIGNS
107	--------------------------------
108	Syntax:    $json_explode(varbase json-document)
109
110	An example is worth a thousand words:
111
112	    $json_explode(e {"one": 1, "two": { "sub1", "hi", "sub2", "bye" })
113	will result in three new assigns
114		$e[one]		-> 1
115		$e[two][sub1]	-> hi
116		$e[two][sub2]	-> bye
117
118	CONVERTING ASSIGNS TO JSON DOCS
119	-------------------------------
120	Syntax:	   $json_implode(varbase)
121
122	This converts everything under $varbase[*] into a JSON doc.
123
124	HANDLING ERRORS
125	--------------
126	If there is an error, $json_error() will tell you about it.
127
128*** News 09/06/2021 -- SSL handling improvements (take 2)
129	The other day I posted some info on how the SSL handling has been
130	improved.  But then things got revamped again, so I delete the old
131	info and am replacing it with this info.
132
133	1) Step one - You connect to an SSL server
134	 You connect to an irc server doing something like
135		/SERVER irc.example.com:6697:type=irc-ssl
136	 This goes through connect()ing to the server, and then doing an
137	 SSL_connect() to set up the certificate exchange and TLS negotiation.
138
139	2) Step two - The SSL handshake is completed
140	 After the SSL_connect() step has completed, we now have a fully
141	 functioning TLS socket with an SSL certificate.  Before we use the
142	 TLS socket, we're supposed to verify we trust the SSL certificate,
143	 to ensure we're talking to who we think we are.
144
145	3) Step three - The client watches the certificate verification
146	 OpenSSL "verifies" the certificate and the client provides
147	 a C function to tag along for the ride.  The callback function
148	 is called every time:
149	   (1) An error is discovered, or
150	   (2) There are no (further) errors in a certificate.
151	 Thus, if a certificate is trusted, it will only report
152	 "no problems" for each link in the chain.
153
154	 This permits the client to trap and categorize every error that
155	 happens - some certificates have multiple problems!  There are
156	 three buckets the client uses:
157		(1) Self-signed certificates
158		(2) Incorrect-hostname certificates
159		(3) Any other (serious) error
160	 The client tracks the "most serious error" (if there is one),
161	 using the above priorities.
162
163	4) Step four - The cliet offers you /ON SSL_SERVER_CERT
164	  The client sets $serverctl(SET <refnum> SSL_ACCEPT_CERT -1)
165	  and then throws /ON SSL_SERVER_CERT.   The use of -1 is on
166	  purpose so the client can determine whether your /ON handler
167	  sets it to 0 or 1.
168
169	  If your handler does a $serverctl(SET <retval> SSL_ACCEPT_CERT 0|1)
170	  then that is taken as the final disposition of the handling, and
171	  nothing further occurs. (ie, it skips the rest of the steps)
172
173	  Parameters of /ON SSL_SERVER_CERT
174		$0  The fd of the socket
175		    (Use $serverctl(FROM_SERVER) to get the server refnum)
176		$1  Certificate Subject, url-encoded
177		$2  Certificate Issuer, url-encoded
178		$3  Bits used in the public key
179		$4  OpenSSL error code of the "most serious error"
180			(18 is "Self-signed certificate",
181			 62 is "Hostname mismatch",
182			 everything else is irregular/bad)
183		$5  The SSL regime being used (ie, TLSv1.2)
184		$6  The Certificate Hash
185		$7  Was there a hostname mismatch?  0 = no error, 1 = error
186		$8  Was there a self-signed error?  0 = no error, 1 = error
187		$9  Was there another (serious) error?
188			0 = no other error 1 = other error
189		$10 Was there any error of any kind?
190			0 = no errors of any kind, 1 = some kind of error
191
192	5) Step five - The client makes a provisional decision
193	  Next, the client looks at the errors and decides whether
194	  it thinks the cert is ok.
195	    * Cert has no errors 		   -> ACCEPT
196	    * Cert has "self signed" or "wrong hostname" error
197	      and /SET ACCEPT_INVALID_SSL_CERT ON  -> ACCEPT
198	    * Cert has "self signed" or "wrong hostname" error
199	      and /SET ACCEPT_INVALID_SSL_CERT OFF -> REJECT
200	    * Cert has any serious error	   -> REJECT
201	  The client sets this provisional value with
202		$serverctl(SET <refnum> SSL_ACCEPT_CERT 0|1)
203
204	6) Step six - The client offers you /ON SERVER_SSL_EVAL
205	  Then, the client hooks /ON SERVER_SSL_EVAL.  At this point,
206	  all of the information your script needs to make a fully
207	  informed decision to accept or overrule the client's choice
208	  is available.  Your handler is not obligated to make any
209	  change, but it certainly can if it wants to
210
211	  Parameters of /ON SERVER_SSL_EVAL
212		$0  The server refnum
213		$1  The "ourname" of the server (what you /server'd to)
214		$2  Was there any error at all?
215			0 = no errors of any kind   1 = some kind of error
216		$3  Was there a hostname mismatch?  0 = no error, 1 = error
217		$4  Was there a self-signed error?  0 = no error, 1 = error
218		$5  Was there another (serious) error?
219			0 = no other error, 1 = other error
220		$6  What does the client suggest?
221			0 = reject certificate, 1 = accept certificate
222
223	  Using $serverctl() to get info about the certificate
224	  Use $serverctl(GET <refnum> <item>) where <item> is:
225		SSL_CIPHER		The encryption cipher being used
226		SSL_PEM			The certificate (in PEM format)
227		SSL_CERT_HASH		The certificate's hash
228		SSL_PKEY_BITS		The bits in the public key
229		SSL_SUBJECT		Who the cert was issued to
230		SSL_SUBJECT_URL		Who the cert was issued to (url-encoded)
231		SSL_ISSUER		Who issued the cert
232		SSL_ISSUER_URL		Who issued the cert (url-encoded)
233		SSL_VERSION		What version of SSL being used (ie, TLSv1.2)
234		SSL_SANS		Subject Alternate Names in the cert
235		SSL_CHECKHOST_ERROR	Hostname Mismatch error - 0 (no) 1 (yes)
236		SSL_SELF_SIGNED_ERROR	Self-signed error - 0 (no) 1 (yes)
237		SSL_OTHER_ERROR	        Any other (serious) error - 0 (no) 1 (yes)
238		SSL_MOST_SERIOUS_ERROR	The OpenSSL error code of the most serious error
239					18 (self-signed) and 62 (hostname mismatch)
240					are considered non-serious (routine) errors
241		SSL_VERIFY_ERROR	Any error at all - 0 (no) 1 (yes)
242		SSL_ACCEPT_CERT		Is this cert headed for acceptance?  0 (no) 1 (yes)
243
244	   Use $serverctl(SET <refnum> SSL_ACCEPT_CERT 0) to reject the cert
245	   Use $serverctl(SET <refnum> SSL_ACCEPT_CERT 1) to accept the cert
246	   If you don't do anything, the client will do the most reasonable thing
247
248	7) Step seven - The client moves forward
249	  Finally, everyone has had a chance to weigh in.
250	  Whatever the value of $serverctl(GET <refnum> SSL_ACCEPT_CERT)
251	  is after all this, is used to accept or reject the SSL connection.
252
253*** News 09/02/2021 -- Configuring SSL Ciphers
254	Now, if you know what you are doing, you can set
255	the SSL Ciphersuites that the client will use for
256	SSL connections, via
257		/SET SSL_CIPHERS <stuff>
258	If you don't know what you're doing, don't touch.
259	The default value is "unset", which means we let
260	openssl choose the ciphers for us.
261
262*** News 09/02/2021 -- SSL Handling improvements
263	[replaced -- see above]
264
265*** News 08/30/2021 -- New server description field "ssl-strict"
266	[this feature was removed]
267
268*** News 05/29/2021 -- EPIC5-2.1.5 released here (Fecund) (Commit id: 1945)
269
270*** News 05/25/2021 -- Updated configure to autoconf-2.69
271	We upgraded configure from autoconf-2.13 to 2.69 here.
272	Along the way, we fixed the support for python3.8+
273
274*** News 05/20/2021 -- Windows have UUIDs ($windowctl(GET x UUID))
275	Every window now receives an immutable UUID when it is
276	created.  This UUID is globally unique and cannot be changed.
277
278	Although the UUID is not user-facing (as in /window list),
279	you can get it with $windowctl(GET refnum UUID).
280
281	The UUID is an lval (that is, it does not contain hyphens),
282	so you can use it as part of a variable name if you wish.
283
284*** News 05/20/2021 -- New concept, "claiming channels"
285	When EPIC receives a protocol JOIN message for a channel,
286	it has to decide what window to put the channel in.
287	A common request has been the opportunity to let scripts
288	decide where new channels should go, rather than it being
289	hardcoded.
290
291	So now when a JOIN is received, an /ON will be thrown
292	(see below) which is an invitiation for your script to do
293	whatever preparatory work for the channel you see fit.
294
295	One thing in particular is /WINDOW CLAIM (see below), which
296	tells EPIC which window the channel should be put into.
297	As part of this process, EPIC will suggest a window the
298	channel should go into, unless you choose to overrule that.
299
300	*** NONE OF THIS APPLIES TO /JOIN or /WINDOW CHANNEL
301	    when the user is deliberately moving a channel they are
302	    already on between windows.  You can't stop that.
303
304*** News 05/20/2021 -- New /ON, /ON CHANNEL_CLAIM
305	The /ON CHANNEL_CLAIM is thrown when a JOIN is received,
306	but before the client has assigned the channel to a window.
307		$0 - The server refnum
308		$1 - The channel being joined
309		$2 - The window refnum epic proposes to put the
310		     window into.
311
312	If your handler does /WINDOW CLAIM in any particular window,
313	then the channel will go to that window that you specify.
314
315	At this time, you can only do /WINDOW CLAIM in a window that
316	is connected to the server in $0. In the future, this will
317	probably change.  But for now, a /WINDOW BIND in a "window
318	connected to the wrong server" is treated as invalid.
319
320	If you do not do a valid /WINDOW CLAIM, then the channel will
321	go into the window proposed by EPIC.
322
323*** News 05/20/2021 -- New /WINDOW operation. /WINDOW CLAIM #channel
324	During the handling of an /ON CHANNEL_CLAIM, you may perform
325	the /WINDOW CLAIM operation to direct EPIC to put the new
326	channel into a particular window.
327
328	You must pass the name of the channel as a paraemter.
329	It is available as $1 in the /on.
330
331	You may only claim the channel in a window that is connected
332	to the correct server (from $0).  Attempting to claim a
333	channel in a window connected to the wrong server is invalid
334	and has no effect.   This will change in the future.
335
336*** News 05/20/2021 -- $uuid4() can now return lvals (NODASHES)
337	You can now get a uuid4 that is valid as an lval if you
338	supply NODASHES as the only argument
339		@ a.$uuid4(NODASHES) = [whatever]
340
341	ALL ARGUMENTS TO THIS FUNCTION ARE RESERVED FOR FUTURE EXPANSION.
342	There are now two defined behaviors:
343		$uuid4()	 - UUID4 with dashes
344		$uuid4(NODASHES) - UUID4 without dashes
345	EVERYTHING ELSE IS UNDEFINED BEHAVIOR (ie, other arguments may
346	do something today, but forwards compatability is not guaranteed)
347
348*** News 03/26/2021 -- EPIC5-2.1.4 released here (Redound) (Commit id: 1927)
349
350*** News 02/13/2021 -- /UNLOAD now supports /TIMERs
351	If you create a /TIMER in a script you /LOAD with /PACKAGE
352	the timer will be tagged just like any aliases or assigns
353	or ons or whatever.
354
355	Note that /TIMERs are _not_ tagged if they are created
356	after /load time.  This includes but is not limited to
357	timers created by aliases that are tagged; as well as
358	timers that create new versions of themselves (but it
359	will catch timers that run forever)
360
361*** News 02/10/2021 -- New /WINDOW operation, /WINDOW UNCLEAR
362	There was already an /UNCLEAR command, and a /CLEAR and
363	/WINDOW CLEAR command, but there was no /WINDOW UNCLEAR.
364	WHy not? Anyways...
365
366*** News 02/07/2021 -- Low level operations on cutbuffer - $inputctl()
367	Harzilein asked if there was a way to manipulate the cutbuffer
368	without having to put something in the input line.  As it happens,
369	that has never been requested before.  So here we go!
370
371	$inputctl(GET cutbuffer)
372		This returns the cut buffer.  This is the same as $U
373
374	$inputctl(SET cutbuffer ... new value ...)
375		This sets the cut buffer.  This would be effectively
376		the same as:
377		 * Saving the input line (with $L)
378		 * Erasing the input line (parsekey ERASE_LINE)
379		 * /TYPEing what you want into the cut buffer
380		 * Erasing the input line (to put it into the cut buffer)
381		 * /TYPEing the origial input line
382		But this doesn't require you to disrupt the input line.
383
384		Please remember that there is only one cut buffer,
385		and a large number of operations replace it -- so
386		whatever you put in the cut buffer, use it quickly,
387		or the user might clobber it.
388
389*** News 02/05/2021 -- /ON SERVER_STATUS changed to /ON SERVER_STATE
390	Some expressed some confusion about whather "SERVER STATUS"
391	and "SERVER STATE" were the same thing, and what the states
392	were and what they meant.  To reduce this confusion, there
393	will be only one term, "SERVER STATE". However, much code
394	already uses "SERVER STATUS".  So we have to support both.
395
396	For now, /ON SERVER_STATUS and /ON SERVER_STATE will both
397	exist side by side.   However, I recommend you use
398	/ON SERVER_STATE for new code, and think about migrating
399	your old code.   There will come a day when /ON SERVER_STATUS
400	will beoome an alias for /ON SERVER_STATE.
401
402	To be unambiguous, using /ON SERVER_STATUS will never break.
403	But you should know the official name is going to be
404	SERVER_STATE.
405
406	The stock scripts have been updated.  You can get the changes
407	by making sure to do a 'make install'
408
409*** News 02/05/2021 -- $serverctl(GET x STATUS) changed to STATE
410	As per the above, both $serverctl(GET x STATUS) and
411	$serverctl(GET x STATE) will return the server's state.
412	However, you are encouraged to start using "STATE", since
413	that is now the official term for it.
414
415	The stock scripts have been updated.  You can get the changes
416	by making sure to do a 'make install'
417
418*** News 07/03/2020 -- New /WINDOW operation, /WINDOW DELETE_KILL
419	Harzilein pointed out:
420	  1) You cannot delete the last window on a screen
421	  2) Deleting a screen does not kill a window
422	  3) Therefore, deleting a screen necessarily orphans a window
423	But what if you don't want to orphan a window when you kill a
424	screeN?
425
426	The /WINDOW DELETE_KILL operation does a /WINDOW DELETE and
427	then does a /WINDOW KILL on the window that was the current
428	window.  There are several caveats to this *which i reserve
429	the right to change in the future*
430
431	Caveat 1) Only the "current window" gets killed.  So if you
432	    DELETE_KILL a screen with multiple windows, other windows
433	    will be orphaned in the ordinary way.  I reserve the right
434 	    to change this behavior (it will be documented)
435	Caveat 2) If you cannot kill the window for other reasons,
436	    such as /window killable off, then the attempt to kill the
437	    window will fail, and it will be orphaned.
438
439*** News 05/11/2020 -- EPIC5-2.1.2 released here (Lugubrious) (Commit id: 1908)
440
441*** News 05/09/2020 -- New built in function $execctl()
442	You can now program the /EXEC command with this low level function
443
444	--- warning ---
445	Many of the things you can set here are not sanity checked.
446	If you feed it garbage in, you will get garbage out.
447	If you need safety rails, use the /EXEC command.
448	--- warning ---
449
450	Usage:
451	------
452	$execctl(REFNUMS)
453		Get all refnums in the entire system (as integers)
454	$execctl(REFNUM <description>)
455		Convert a description (like %3 or %myproc) into a refnum integer
456
457	$execctl(NEW <commands>)
458		Create a new /exec process (does not run it!)
459	$execctl(LAUNCH <refnum>)
460		Run an /exec process that hasn't been started yet
461	$execctl(CLOSEIN <refnum>)
462		Close the STDIN to the process (this means you can't send any
463		more data to the program.  This is useful for programs
464		that wait until they've got an EOF from stdin to do their
465		thing)
466	$execctl(CLOSEOUT <refnum>)
467		Close the STDOUT and STDERR from the process (this means
468		we won't receive any more output from the program.  This is
469		useful if we don't want any more output from the program.
470		Many programs will die from SIGPIPE if stdout is closed)
471	$execctl(SIGNAL <signal> <refnum>)
472		KILL (send a signal) to a process.  The <signal> may either
473		be an integer (like $execctl(SIGNAL 9 3) or it may
474		be a short name (like $execctlSIGNAL HUP 3) to kill
475		process 3.
476
477	$execctl(GET <refnum> [FIELD])
478	$execctl(SET <refnum> [FIELD] [VALUE])
479		You can GET all the fields of the object, and SET some of them.
480		Some fields cannot be changed after the process is launched.
481
482	Field		Set?	Notes
483	-------------	------	-----------------------------------
484	REFNUM		No	The integer refnum - never repeated.
485	REFNUM_DESC	No	The "target" version (ie, %3)
486	LOGICAL		Yes	The user-supplied name - must be unique
487	LOGICAL_DESC	No	The "target" version (ie, %myproc)
488				-- This will change if you SET LOGICAL
489	COMMANDS	Yes	The commands to run (**)
490	DIRECT		Yes	Whether to use a shell (**)
491	REDIRECT	Yes	Either PRIVMSG or NOTICE
492	WHO		Yes	The target to send output to
493				-- Output from the process is redirected verbatim
494	WINDOW_REFNUM	Yes	The window this exec runs in context of
495				-- Undefined behavior if window does not exist
496	SERVER_REFNUM	Yes	The server this exec runs in context of
497				-- This is for redirects and code callbacks
498	LINES_LIMIT	Yes	How many lines to receive before CLOSEOUT
499				-- 0 means "no limit"
500	STDOUTC		Yes	ircII code for every complete line of stdout
501	STDOUTPC	Yes	ircII code for every partial line of stdout
502	STDERRC		Yes	ircII code for every complete line of stderr
503	STDERRPC	Yes	ircII code for every partial line of stderr
504
505	PID		No	The process id of the process (after launch)
506				-- This is -1 before launch
507	STARTED_AT	No	When the process was created or launched
508				-- It is first set when creation happens
509				-- It is last set when launched
510	P_STDIN		No	File descriptor to talk to process's STDIN
511	P_STDOUT	No	File descriptor to read from process's STDOUT
512	P_STDERR	No	File descriptor to read form process's STDERR
513				-- There is nothing you can do with these.
514				-- Don't try.
515	LINES_RECVD	No	How many lines of output the process has sent
516	LINES_SENT	No	How many lines we sent to the process
517	EXITED		No	0 if process has exited yet -- 1 if it has
518	TERMSIG		No	The signal that killed the process
519				-- It is -1 if the process has not died
520				-- It is -1 if the process exited normally
521	RETCODE		No	The exit code of the process
522				-- It is -1 if the process has not died
523				-- It is -1 if the process was killed
524	DUMB		No	Reserved for future/internal use
525	DISOWNED	No	Reserved for future/internal use
526	(Note: ** - Cannot be SET after launch)
527
528*** News 05/08/2020 -- New flag to /EXEC, /EXEC -NOLAUNCH
529	The /EXEC -NOLAUNCH flag directs the /EXEC command not to launch
530	a process that has not already launched.  You can launch it later
531	merely by referencing it with its name or refnum.
532
533		/EXEC -nolaunch -name myproc ls -l
534		/EXEC -nolaunch -limit 5 %myproc
535		/EXEC %myproc
536
537	Many /EXEC operations do not work on an unlaunched process.
538
539*** News 05/07/2020 -- New function, $uuid4()
540	This function returns a random UUID4 string.  If you know what that is,
541	you might know why it's handy to be able to have one.
542
543	ALL ARGUMENTS TO THIS FUNCTION ARE RESERVED FOR FUTURE EXPANSION.
544	To get the default behavior, pass no arguments to this function.
545	Forwards compatability is not guaranteed if you pass undefined args
546
547*** News 05/07/2020 -- New /ON, /ON SEND_EXEC
548	Whenever text is being sent to an /EXEC process, either through /EXEC -IN
549	or /MSG %proc or a /QUERY or whatever, it is displayed to your screen.
550	The /ON SEND_EXEC process will let you adorn how this text is displayed,
551	instead of it just being displayed blankly as it has always done.
552
553*** News 05/07/2020 -- The /EXEC command
554	The /EXEC command has always been part of ircII, but it hasn't
555	changed much during EPIC's lifetime.  There were some rough edges
556	related to querying exec'd processes, things not always going
557	to the windows people expected, some flags not being able to be
558	used with other flags, etc.
559
560	So the /EXEC command has been substantially revamped, with an intention
561	of everything being "do what i expect".  If you find things that are
562	weirdly behaving, please let me know!
563
564	Instead of describing the changes, let's just level-set the behavior:
565
566	Every /EXEC command can create or modify one process
567
568	[The most general explanation of the syntax]
569	Modify an existing running exec:
570		/EXEC [options] %refnum [extra arguments]
571		/EXEC [options] %logical-name [extra arguments]
572
573	Create a new exec:
574		/EXEC [options] commands to run
575		/EXEC [options] (commands to run) [extra-arguments]
576
577	OPTIONS to /EXEC
578
579	   [ Options related to sending data to/from the process ]
580		-CLOSE
581			Close the process's STDIN, STDOUT, and STDERR
582		-CLOSEIN
583			Close the process's STDIN
584		-CLOSEOUT
585			Close the process's STDOUT and STDERR
586		-IN [extra arguments]
587			Send data to a process
588
589	   [ Options related to how the process integrates with ircII ]
590		-NAME
591			Change the logical name of a process
592		-OUT
593			Send all output from the process to the now-current
594			channel in the now-current window.
595		-WINDOW
596			Display all output from or related to the process to the
597			now-current window.
598		-WINTARGET <windesc>
599			Display all output from or related to the process to the
600			specified window
601		-MSG [target]
602			Send all output from the process to the target.
603			The target can be an irc, dcc chat, or other exec,
604			or anything you can send a message to.
605			Messages sent over IRC are sent as PRIVMSGs
606		-NOTICE
607			Send all output from the process to the target.
608			Messages sent over IRC are sent as NOTICEs.
609
610	    [ Options related to scripting with processes ]
611		-LINE {code}
612			Run {code} for each full line of output from stdout of the process.
613			$* will be the line of output
614		-LINEPART {code}
615			Run {code} for each incomplete line of output from stdout of the process.
616			$* will be the incomplete line of output
617		-ERROR {code}
618			Run {code} for each full line of output from stderr of the process.
619			$* will be the incomplete line of output
620		-ERRORPART {code}
621			Run {code} for each incomplete line of output from stderr of the process.
622			$* will be the incomplete line of output
623		-END {code}
624			Run {code} when the process has completed.  This means when the process
625			has exited and all of its output has been processed.  (Sometimes this
626			lags the actual exit)
627				$0 is the logical process name or its refnum
628				$1 is the signal that killed it (if it was killed)
629				$2 is the exit code (if it exited)
630
631	    [ Options that don't fit in the other categories ]
632		-DIRECT
633			Run the program directly -- do not use a shell.
634			Advantages:  The command you give is literally executed
635			Disadvantages: If you depend on filename globbing or aliases, well, tough
636		-LIMIT <number>
637			Read <number> lines from the process and then -CLOSE it.
638
639	    [ Options related to sending a signal to the process ]
640		-<signal_number>
641			Send the signal to the process, similar to kill -<signal_number> <pid>
642		-<signal_name>
643			Send the signal to the process, similar to kill -<signal_name> <pid>
644
645	Additionally, %<procref> or %<procname> are full blown message targets that you can
646	/msg or /query or whatever you want, just like all other targets.
647
648	[Examples of how this works]
649
650
651*** News 04/26/2020 -- New python script, 'shortener'
652	You can load this script with
653		pyload shortener
654	This script provides an in-client URL shortening service.
655	Whenever someone provides a URL in a message, the service
656	will create a short URL that will be served by an http
657	redirection server that runs in client
658
659	Example:
660	--------
661	<nick> hey, please visit www.frobnitz.com/really-long-and-wraps
662        +onto-the-next-line-so-you-can-tpaste-it
663	*** http://127.0.0.1:8080/1
664
665	Then you can visit http://127.0.0.1:8080/1 and it will
666	redirect you to the original url.
667
668*** News 02/24/2019 -- EPIC5-2.1.1 (Abulia) was released here
669	Even though not everything is done, I think I've probably
670	dragged my feet long enough
671
672*** News 11/28/2018 -- /EXEC -WINTARGET outsputs to a window by name (caf)
673	The normal behavior of /EXEC is to send the output of a command
674	to the current window (or is it the OTHER window?  I forget)
675	Before this, you couldn't ordinarily send it to just any old
676	random window you wanted.
677
678	You can use /EXEC -WINTARGET to send it to any window you want:
679	Example:
680		/exec -wintarget msgwin ls
681
682*** News 02/24/2019 -- EPIC5-2.1.1 released here (Abulia) (Commit id: 1899)
683
684*** News 02/05/2018 -- CTCP UTC now implemented as script
685	Given the below feature, CTCP PING support has been
686	rewritten, and CTCP UTC is now scripted.
687
688*** News 02/13/2018 -- New flag for $ctcpctl(), "REPLACE_ARGS"
689	There are actually two kinds of CTCPs that replace things
690
691	* CTCP PING replaces its argument(s), but is otherwise
692	  handled "normally"
693		NOTICE nick :\001PING <sec> <usec>\001
694	  becomes
695		NOTICE nick :\001PING <sec> seconds\001
696
697	* CTCP UTC replaces itself entirely:
698		PRIVMSG nick :\001UTC 1518582810\001
699	  becomes
700		PRIVMSG nick :Tue Feb 13 22:33:30 2018
701
702	So it's not enough to say that "a CTCP handler can replace
703	itself by returning a string", you need to be able to say
704	whether this CTCP replaces its arguments only, or whether
705	it replaces itself entirely.
706
707	  * $ctcpctl(SET <ctcp-name> REPLACE_ARGS 1)
708	  * $ctcpctl(SET <ctcp-name> REPLACE_ARGS 0)
709		Select whether or not a CTCP handler that returns a
710		string replaces its arguments (like CTCP PING) or
711		replaces itself entirely (like CTCP UTC).
712		The default is 0 (replace entirely)
713
714*** News 02/05/2018 -- Some CTCPs are now implemented as scripts
715	YOU NEED TO START DOING /LOAD ctcp  IN YOUR STARTUP SCRIPTS.
716
717	One of the larger projects in EPIC5 was to move as many
718	hard coded things into scripts as was feasible, so you,
719	the user (or the script you're using) can have as complete
720	control over them.  We've moved a lot of functionality out
721	into scripts.
722
723	Traditionally those users who don't have startup scripts
724	(~/.epicrc or ~/.ircrc) get /load global as their startup
725	script.  One of the things /load global does is /load builtins
726	which brings in the scripted features.
727
728	Now /load builtins will /load ctcp, which implements these
729	core CTCP functions entirely in ircII, so you are welcome
730	to modify or remove them, as _you_ choose.
731
732		VERSION		PING		ECHO
733		CLIENTINFO	USERINFO	ERRMSG
734		FINGER		TIME
735
736	Maybe more will be migrated in the future.  But this is a good
737	start for now.  This is also a great example of how to
738	build your own first-class ctcp handlers!
739
740*** News 02/04/2018 -- User-defined CTCP handlers with $ctcpctl()
741	You can now create your own first-class user-defined CTCP handlers.
742
743	A CTCP handler is a block of code that takes four arguments:
744	  $0  - The person making the request
745	  $1  - The target of the request (you, or a channel you're on)
746	  $2  - The CTCP that was sent
747	  $3- - Arguments (if any) to the CTCP
748
749	A CTCP request handler is a CTCP handler that handles incoming
750	requests (over PRIVMSG).  A CTCP request handler can either
751	   (1) generate a response or
752	   (2) substitute something.
753	A response can be generated with:
754	      /CTCP $0 $2 Your Response Here
755	A substitute string is /return'ed by your handler, and replaces
756	the CTCP in the original message.
757
758	A CTCP response handler is a CTCP handler that handles incoming
759	responses (over NOTICE).  A CTCP request handler can either
760	   (1) Output the response in a special way or
761	   (2) substitute something
762	CTCP response handlers are unusual, because the ordinary handling
763	of CTCP responses is the expected behavior.
764
765	Syntax:
766	  * $ctcpctl(SET <ctcp-name> REQUEST {<code>})
767		Register <code> as a CTCP handler for <ctcp-name> requests.
768
769	  * $ctcpctl(SET <ctcp-name> RESPONSE {<code>})
770		Register <code> as a CTCP handler for <ctcp-name> responses.
771		(Note -- handling responses is unusual.  Normally you just
772		 let the client output responses in the ordinary way)
773
774	  * $ctcpctl(SET <ctcp-name> DESCRIPTION <string>)
775		SET <string> as the CLIENTINFO for <ctcp-name>.  That is,
776		when someone does /CTCP CLIENTINFO <ctcp-name>, <string>
777		will be returned as the description for this CTCP.
778
779	  * $ctcpctl(SET <ctcp-name> SPECIAL 1)
780	  * $ctcpctl(SET <ctcp-name> SPECIAL 0)
781		Enable/Disable a CTCP as being "Special".  A "Special" CTCP
782		is a remote function call, and handles everything itself.
783		There are only two "special" CTCPs -- ACTION (/me) and DCC.
784		I'm not sure if anyone will create a "special" user-defined CTCP
785
786	   * $ctcpctl(SET <ctcp-name> RAW 1)
787	   * $ctcpctl(SET <ctcp-name> RAW 0)
788		Enable/Disable a CTCP has requiring the "raw data".
789		Ordinary CTCPs transport strings, and they have to be recoded
790		according to /encode-ing rules.  But some CTCPs transport
791		binary data, and so the handler needs access to the raw binary
792		data.  Ordinarily, the raw/binary data is CTCP encoded, which
793		mens you can pass it to $xform("-CTCP") to recover the raw
794		bytes (although it might not be a C string, so you can't
795		assign it to a variable.)
796
797	   There are corresponding GET operations for the above
798
799	You can get all the registered CTCPs with
800	   * $ctcpctl(ALL)
801
802	Very soon, quite a few CTCP types will be migrated out to a script that
803	will be /load'ed from /load global, and you may have to add it to your
804	own start scripts if you do not /load global.
805
806	I need to write much better examples for all this.  To look at this you'd
807	scratch your head and wonder why you care.  But being able to add new
808	CTCPs instead of requiring them to be written in C in a new version of
809	epic is expected to help a lot of people.
810
811
812*** News 01/16/2018 -- New status expando %{1}P ("status prefix") and variables
813	The %{1}P value will expand to a "when window current" or "when window
814	not current" value.  The idea is to put this at the start of your
815	/set status_format or /window status_format type variables.
816
817	When a window is current, %{1}P will expand to either
818		/window status_prefix_when_current
819	or
820		/set status_prefix_when_current
821
822	When a window is not current, %{1}P will expand to either
823		/window status_prefix_when_not_current
824	or
825		/set status_prefix_when_not_current
826
827	You can use this all in your ~/.epicrc, like so:
828		set status_format %{1}P%T [%R] %*%=%@%N%#%S%{1}H%H%B%Q%A%C%+%I%O%M%F%L %D %U %W
829		set status_prefix_when_current ^C37,40
830		set status_prefix_when_not_current ^C37,44
831	which will make your status bar white-on-black when current,
832	and white-on-blue when not current.
833
834
835EPIC5-2.0
836EPIC5-1.8
837
838*** News 08/05/2016 -- EPIC5-2.0.1 released here (Commit id: 1869)
839
840*** News 01/30/2016 -- EPIC5-2.0 released here (Commit id: 1864)
841
842*** News 01/30/2016 -- EPIC5-1.8 released here (Commit id: 1862)
843
844*** News 01/30/2016 -- /WINDOW LOGFILE and /SET LOGFILE more like /LOG FILNAME
845	Historically, changing a logfile name (with /WINDOW LOGFILE and
846	/SET LOGFILE) does not affect the log status.  This leads to
847	unexpected behavior if you do /WINDOW LOG ON LOGFILE foo.txt
848	because /WINDOW LOGFILE only changes the filename the *next* time
849	you open the log, not affecting the currently open log.
850
851	The behavior of /LOG FILENAME is more in line with what people
852	said they expected.  If you change /LOG FILENAME while the
853	log is ON, then it will 1) close the existing log, 2) change
854	the filename, and 3) re-open the log under the new name.
855
856	The behavior of /WINDOW LOGFILE and /SET LOGFILE have been changed
857	to match the behavior of /LOG FILENAME -- changing the logfile name
858	while it is open will close the existing log and open a new one.
859
860EPIC5-1.6
861
862*** News 01/30/2016 -- EPIC5-1.6 released here (Commit id: 1854)
863
864*** News 01/08/2016 -- Per-server vhosts now restrict protocol (ipv4/ipv6)
865	Historically, the client tries to connect to the server using the
866	addresses as they are returned in order.  (This is a great thing
867	for round-robin or geographic-aware dns resolvers.)
868
869	However, if you have a per-server vhost, you probably intend that
870	epic use that vhost to connect to the server.  But what happens if
871	your vhost is ipv4 only or ipv6 only, and the first address to the
872	server is to the other protocol?  Historically, epic will just go
873	ahead and connect without your vhost.
874
875	You've been able to correct this behavior by specifying explicitly
876	the protocol family:
877		/server irc.foo.com:proto=v6:vhost=irc.leet6.com
878	Some folks said it violated POLA, so here's a new rule:
879
880	"If you set a per-server vhost, then that server can only be
881	 connected to if the vhost can be used.  If ths means that no
882	 addresses can be used, then you will not be able to connect
883	 to the server until you clear the vhost."
884
885	This rule does not apply to you if you're using /HOSTNAME but
886	only if you are doing something like
887		/server irc.foo.com:vhost=irc.leet6.com
888
889*** News 01/01/2016 -- Can now /query an exec process that doesn't exist
890	Previously, you were forbidden from setting up a /query to an
891	/EXEC process that didn't exist.  That set up a race condition
892	between running an /EXEC process and being able to corral its
893	output into a window via the query.
894
895	So now you can /query an exec process before you start it.
896
897	If you try to send a message to it before you do fire it up,
898	the user will see a diagnostic telling them that the message
899	could not be sent to a non-existing exec process.
900
901*** News 01/01/2016 -- New /window operation, /window log_mangle
902	This allows you to overrule /SET MANGLE_LOGFILES for logs that
903	you create with /WINDOW LOG ON (only!)
904	Example:
905		window logfile "my.windowlog" mangle NORMALIZE,COLOR log on
906
907*** News 01/01/2016 -- New /window operation, /window log_rewrite
908	This allows you to overrule /SET LOG_REWRITE for logs that
909	you create with /WINDOW LOG ON (only!)
910	Example:
911		window logfile "my.windowlog" rewrite "HOOBOO $1-" log on
912
913*** News 01/01/2016 -- Refinement to $pad(), $[len]var, and $leftpc()
914	These functions do not behave graciously since our conversion
915	to UTF-8, since they count code points rather than columns.
916	It just seems sensible to redefine the behavior of these
917	functions based on columns, which is what everybody probably
918	expects them to do.
919
920	Function: $pad(len char string)
921	Summary: Extend, but do not truncate, do not justify 'string'
922	Definition:
923		Return 'string' so that it takes up at least 'len' columns.
924		If it is too short, it will be padded with 'char's until
925			it is 'len' columns wide.
926		If it is too long, it is NOT truncated.
927
928	Function: $leftpc(len string)
929	Summary: Truncate, but do not extend, do not justify 'string'
930	Definition:
931		Return the first 'len' columns of 'string'.
932		If it is too short, it will NOT be padded.
933		If it is too long, it will be truncated on the right end.
934
935	Function: $[len]var
936	Summary: Extend, truncate, and justify $var
937	Definition:
938		Return $var so that it takes up EXACTLY 'len' columns.
939		If it is too short, it will be padded with /set pad_char
940			until it is 'len' columns wide.
941		If it is too long, it is truncated.
942		If 'len' is > 0, then the string is left justified, and
943			padding (or truncation) happens on the right end.
944		If 'len' is < 0, then the string is right justified, and
945			padding (or truncation) happens on the left end.
946
947	Function: $fix_width(len justify pad string)
948	Summary: Extend, truncate, and justify 'string'
949	Definition:
950		Return 'string' so it takes up EXACTLY 'len' columns.
951		If it is too short, it will be padded with 'pad'
952			until it is 'len' columns wide.
953		If it is too long, it is truncated.
954		If 'justify' is "l" then the string is left justified,
955			and padding (or truncation) happens at the right
956		If 'justify' is "c" then the string is centered, and
957			padding (or truncation) happens equally at both
958			ends.
959		If 'justify' is "r" then the string is right justified,
960			and padding (or truncation) happens at the left.
961
962*** News 09/15/2015 -- New /ON, /ON RAW_IRC_BYTES
963	This new /ON, /ON RAW_IRC_BYTES is the same as /ON RAW_IRC,
964	except $* is the _raw unmodified bytes_ received from IRC.
965	Specifically, $* is not guaranteed to be a UTF-8 string, so
966	functions that expect a UTF-8 string won't work.  You should
967	not try to /ECHO the $* from this /ON.
968
969	Just like /on raw_irc, if you catch this hook, you will
970	suppress normal handling of the event:
971		/on ^raw_irc_bytes * {echo nothing further happens}
972
973EPIC5-1.4
974
975*** News 08/29/2015 -- EPIC5-1.4 released here (Commit id: 1833)
976
977*** News 08/25/2015 -- Improved automargin support
978	You can now use automargins to get better wrapping of long urls.
979
980	1. Use a terminal emulator that supports automargins
981	   (they pretty much all do)
982	2. Set your TERM env variable to something that supports automargins
983		export TERM=vt102am
984	   should do the job
985	3. Restart EPIC after you've updated the TERM.  It's not enough
986	   to just change the TERM and re-attach screen.  It's a good
987	   idea to check this when you're upgrading.
988	4. /SET -CONTINUED_LINE
989		to get rid of the + thingee
990	5. /SET FIRST_LINE >
991		or something if you don't use /set output_rewrite
992		to prefix every line
993	6. /SET WORD_BREAK<space><space><enter>
994		URLs contain commas and dots and semicolons, and you
995		don't want epic to word break on anything other than
996		a space.
997
998	That should do it!  Your display will now use the final column
999	on the display, and urls should be unmangled when you copy them
1000
1001	If you "forget" to /SET -CONTINUED_LINE or /SET WORD_BREAK and want
1002	to rebreak your windows in order to take advantage of this after
1003	the fact, you can always just do /window rebreak_scrollback.
1004
1005	*** IMPORTANT! ***
1006	Note that you _must_ be running with a TERM supporting
1007	automargins or this will not change things!
1008
1009	You can check this by doing /eval echo $getcap(TERM enter_am_mode)
1010	If it returns blank, then your TERM does not support automargins.
1011	*** IMPORTANT! ***
1012
1013*** News 08/25/2015 -- New /SET, /SET FIRST_LINE
1014	For those of you who use /SET OUTPUT_REWRITE to prefix every line
1015	of output with something (like a timestamp), you can ignore this.
1016
1017	If you /SET FIRST_LINE, the string will be prefixed before every
1018	logical line of output.  This is great if you /SET -CONTINUED_LINE
1019	so you can continue to tell what lines are what.
1020
1021EPIC5-1.2
1022EPIC5-1.1.11
1023
1024*** News 08/09/2015 -- EPIC5-1.2 released here (Commit id: 1817)
1025
1026*** News 07/20/2015 -- New operation: @serverctl(SET refnum UMODE ...)
1027	You've never been able to SET your UMODE, becuase that never
1028	made much sense.  But it was pointed out that the UMODE is used
1029	when you reconnect to establish your initial usermode, and they
1030	wanted to be able to control that.
1031
1032	So now, when the server is disconnected, you can change its umode,
1033	which will be used when you next connect.  Try something like this:
1034		on server_lost * {defer @serverctl(SET $0 UMODE i)}
1035
1036*** News 07/11/2015 -- EPIC5-1.1.11 released here (Commit id: 1810)
1037
1038*** News 07/09/2015 -- Don't do /redirect @W<refnum> <command>
1039	You can /msg @W4 <stuff> for example to do an /xecho -w 4 <stuff>.
1040	But you can't use this with /REDIRECT because the redirection
1041	itself causes another redirect, and it just gets stuck in an
1042	infinite loop.  The client can't protect you from doing this
1043	without a rewrite, so, don't do this. ;-)
1044
1045*** News 07/09/2015 -- New flag to /ENCRYPT: /ENCRYPT -REMOVE
1046	It was confusing to remove /encrypt's before -- you had to specify
1047	all the arguments but not the password:
1048		/ENCRYPT hop -blowfish
1049	And if you had a PROG crypto, you couldn't remove it at all!
1050		/ENCRYPT hop password program...
1051	(How do you not specify the password in this case?)
1052
1053	Anyways, there is now /ENCRYPT -REMOVE which lets you unambiguously
1054	remove an encrypt for a target
1055		/ENCRYPT -REMOVE hop
1056
1057*** News 07/09/2015 -- Only one /ENCRYPT per target now.
1058	Traditionally, ircII has only had one cipher type for /ENCRYPT.
1059	EPIC added more cipher types along the way, and it was possible
1060	to set up multiple /ENCRYPT sessions for the same person.
1061	However, as I reflect upon this, this isn't a reasonable thing to
1062	do, because if you do
1063		/ENCRYPT hop -blowfish password1
1064		/ENCRYPT hop -aessha password2
1065	And then you /msg hop, which one should it use?
1066
1067	So I've changed it so when you change the encryption type (such as
1068	in the 2nd line above), it will REPLACE the first one -- you will
1069	only be able to have one cipher session per target.
1070
1071	If this is a problem -- if I broke something for you, please let me
1072	know so we can address your needs.
1073
1074*** News 04/14/2015 -- New function, $chankey(servref #channel)
1075	The $chankey() function returns the channel for a specified channel.
1076	I created this because $key() doesn't allow you to specify
1077	'servref' but rather uses from_server, which means you have to
1078	wrap it in an /xeval -s to use a non-default server. ick.
1079
1080	Arguments:
1081	 $0	- A server refnum
1082	 $1	- A channel name
1083
1084	Return Value:
1085	 empty string - Either 1.) 'servref' not provided, or
1086			       2.) '#channel' not provided, or
1087			       3.) You're not on '#channel' on servref, or
1088			       4.) #channel doesn't have a key
1089	 anything else - The mode +k key for #channel on servref.
1090
1091*** News 04/14/2015 -- SSL info available via $serverctl(GET refnum SSL*)
1092	You can now get information about live SSL connections:
1093
1094	$serverctl(GET refnum SSL_CIPHER)
1095		The encryption being used, something like "DHE-RSA-AES256-SHA"
1096
1097	$serverctl(GET refnum SSL_VERIFY_RESULT)
1098		0 if the certificate was verified successfully.
1099		Any other value if it did not.
1100		These values match up to the verify(1) man page.
1101		Most notable, error code 20 means that OpenSSL could not find
1102		your local CA file (see /SET SSL_ROOT_CERTS_LOCATION below)
1103
1104	$serverctl(GET refnum SSL_PEM)
1105		This is the PEM (base64) format of the server's certificate.
1106		You could save this to see if it's changed. ;-)
1107
1108	$serverctl(GET refnum SSL_CERT_HASH)
1109		This is the SHA1 digest of the server's certificate.
1110		It is converted into a byte string like AB:CD:EF:01:02:...
1111
1112	$serverctl(GET refnum SSL_PKEY_BITS)
1113		This is the number of bits that the server's certificate
1114		said that the server's public key uses.
1115
1116	$serverctl(GET refnum SSL_SUBJECT)
1117		This is the hostname of the subject of the certificate.
1118		In theory, this is supposed to be the server's hostname.
1119		This could be a wildcard string.
1120
1121	$serverctl(GET refnum SSL_SUBJECT_URL)
1122		This is the SSL_SUBJECT, but passed through URL encoding.
1123		It's useful because the SSL_SUBJECT will have spaces, and
1124		this results in just one word.
1125
1126	$serverctl(GET refnum SSL_ISSUER)
1127		This is the Certificate Authority (CA) that issued the
1128		server's certificate.
1129
1130	$serverctl(GET refnum SSL_ISSUER_URL)
1131		This is the SSL_ISSUER, but passed through URL encoding.
1132		It's useful because the SSL_ISSUER will have spaces, and
1133		this results in just one word.
1134
1135	$serverctl(GET refnum SSL_VERSION)
1136		This is the version of SSL you're using.
1137		It should either be TLSv1 (good) or SSLv3 (bad).
1138
1139	With all of the above information, I hope someone scripts a nice
1140	SSL executive script that caches the certificate information,
1141	tells you whether the connection should be trusted, decides whether
1142	the ssl version is ok, the public key bits are ok, all that stuff.
1143
1144*** News 04/10/2015 -- New /TIMER argument, /TIMER -SNAP
1145	A "snappable" timer fires off at the "top of the interval".
1146	That means it runs every time ($time() % <interval> == 0)
1147	If you snap to 60, it will run at the top of every minute,
1148	just like mail checking, clock updating, etc.  If you snap
1149	to 3600, it will run at the top of every hour.
1150
1151	Example:
1152		/timer -snap -repeat -1 -refnum hourly 3600 {
1153			echo I run at the top of every hour
1154		}
1155
1156*** News 04/10/2015 -- New script, /LOAD find_ssl_root_certs
1157	This script is loaded by /load global, and you should load it
1158	too, if you're not using /load global; or you should implement
1159	a similar functionality to get /SET SSL_ROOT_CERTS_LOCATION pointing
1160	to the right place for you.  Otherwise, your SSL certificates
1161	won't authenticate, and $4 in /on ssl_server_cert will always
1162	be 0, even if the cert is actually legitimate.  Or maybe all
1163	of what I just said doesn't matter to you.
1164
1165*** News 04/10/2015 -- New /SET, /SET SSL_ROOT_CERTS_LOCATION
1166	In order for SSL to verify certificates, it needs to have a copy
1167	of the root certificate authorities.  This is usually a file
1168	named "ca.bundle" or "ca-root-nss.crt".  You need to /set this
1169	variable to wherever your openssl compatable root ca authority
1170	certificates are.  It would help if I understood what I'm talking
1171	about more.  Anyways, the script /load find_ssl_root_certs
1172	tries to help you with this.
1173
1174*** News 04/10/2015 -- Enhancements to /ON SSL_SERVER_CERT
1175	Apparently I've never documented /on SSL_SERVER_CERT.
1176
1177	The /ON SSL_SERVER_CERT hook is thrown every time a successful
1178	connection to an SSL server is made.  For now, the only SSL
1179	connections are to IRC servers, but some day I hope to support
1180	DCC as well.  For now, this refers only to server connections.
1181
1182	  $0 - File Descriptor (need a way to convert to server refnum)
1183	  $1 - The "subject" of the certificate  -- the server name
1184	  $2 - The "issuer" of the certificate
1185	  $3 - How many bits are used by the certificate's public key
1186	  $4 - Did the certificate validate?
1187		0 = pass, anything else = fail.
1188		(For now, this the result of X509_get_verify_result())
1189		(This depends on /SET SSL_ROOT_CERTS_LOCATION (above))
1190	  $5 - What SSL type are we using? (TLSv1 or SSLv3)
1191	  $6 - What is the digest of the SSL Certificate?
1192
1193	The idea is you could use $1 to cache the metadata about a
1194	server, and use $2, $3, $4, $5, and $6 to see if anything
1195	changes from one connection to the next.
1196
1197	Probably more additions will come later.  I'm especially interested
1198	in passing in the complete plain text certificate +url'd up.
1199
1200*** News 04/10/2015 -- More robust certificate verification for SSL
1201	Based on a paper written by Roca He, who is doing a research
1202	project on improper use of OpenSSL API by open source software,
1203	the OpenSSL code in epic was reviewed and enhanced.  One point
1204	of interest was certificate verification -- epic wasn't doing
1205	any of that.  But now it is.  This requires OpenSSL to know
1206	where your root/trusted certificate authorities are, and there
1207	are more notes above about how to handle that.  The results of
1208	this verification are reflected in /on ssl_server_cert above.
1209
1210*** News 04/10/2015 -- You can now /encode to /EXEC processes
1211	The /EXEC system is now UTF-8 aware, and you can use the
1212	/encoding command to recode between %procs targets now. yay!
1213
1214	Example:
1215		/encoding %nonutf8prog iso-8859-15
1216		/exec -name nonutf8prog myprog
1217		<output from 'myprog' treated as iso-8859-15,
1218		 converted to utf8 for epic's use>
1219
1220*** News 04/10/2015 -- New scripts: /load sasl_auth, userlist, tmux_away
1221	Zlonix wrote these scripts.  I need to write blurbs about each.
1222	Until that time, read the scripts, they're well documented!
1223
1224*** News 07/24/2014 -- New feature $windowctl(REFNUMS_ON_SCREEN <winref>)
1225	The $windowctl(REFNUMS_ON_SCREEN <winref>) will return all of the
1226	refnums on the screen that contains window <winref>.  They are
1227	returned in SCREEN ORDER, ie, from top to bottom.
1228
1229	This was because someone wanted to make the bottom window ONLY
1230	double status bar, so he needed to know which one was on bottom
1231	and which ones weren't.
1232
1233	If <winref> is a hidden window, then it will return all of the
1234	invisible windows, but in no guaranteed order.
1235
1236	If <winref> is 0, then it will return the screen for the current
1237	window, of course.
1238
1239	You MUST specify a window refnum of some sort, even if it's just 0.
1240
1241*** News 04/19/2014 -- Support for tmux for /WINDOW CREATE
1242	If you run EPIC under tmux, you can now use /window create and it
1243	will create new screens running under other tmux screens, just like
1244	it does for gnu screen.  There is also /set tmux_options, but I did
1245	not really test that.  What EPIC does is run this command:
1246
1247	  tmux new-window "<wserv_path> <tmux_options> localhost [port]"
1248
1249*** News 04/17/2014 -- /SET TRANSLATION now retired
1250	The /SET TRANSLATION feature which has served us well for many
1251	years is now superceded by /ENCODING, and has been retired.
1252
1253EPIC5-1.1.10
1254EPIC5-1.1.9
1255
1256*** News 04/13/2014 -- EPIC5-1.1.10 released here (Commit id: 1781)
1257
1258*** News 04/12/2014 -- EPIC5-1.1.9 released here (Commit id: 1780)
1259
1260*** News 04/16/2014 -- $fix_width() now fully works, and UTF-8 aware.
1261	The $fix_width() function takes the following arguments:
1262		cols      $0    Number of display columns
1263		justify   $1    Justification ("l" left, "c" center, "r" right)
1264		fillchar  $2    Fill character (can be utf8 cchar)
1265		text      $3-
1266	This fully supports UTF-8, so the result is a string that will
1267	take up "cols" columns, even if "fillchar" takes multiple columns.
1268
1269
1270*** News 04/16/2014 -- Many functions are now UTF8 aware
1271	These functions are now fully UTF8 aware.  This means that
1272	their unit of operation is a unicode character, and not a byte.
1273
1274		after		before		center		chop
1275		chrq		curpos		fix_width	index
1276		indextoword	insert		left		maxlen
1277		mid		msar		pad		pass
1278		rest		reverse		right		rindex
1279		rsubstr		sar		split		strip
1280		strlen		substr		toupper		tolower
1281		tr		wordtoindex
1282
1283	These things are also UTF-8 aware:
1284		/XTYPE -L
1285		$[num]VAR		(pad/truncate $var to num places)
1286		/FEC
1287
1288	Additionally, case sensitivity is UTF8 aware, for all languages,
1289	not just English. (at least as far as I tested)
1290
1291
1292*** News 04/11/2014 -- New function, $encodingctl()
1293	The $encodingctl() gives you a lower level interface to the
1294	encoding system.
1295
1296	The behavior of $encodingctl() is ugly and I regret several of
1297	the decisions I've made already, but that's the way it goes...
1298
1299	As with other $*ctl() functions, if there was not information in
1300	the argument list to decide what you wanted to do, it will return
1301	the empty string.
1302
1303	- $encodingctl(REFNUMS)
1304	Return all recode rule refnums.
1305
1306	- $encodingctl(MATCH servref sender receiver)
1307	Decide which recode rule would be used for a message sent by
1308		"sender" to 'receiver' over the server 'servref'.
1309	If you are the sender, use $servernick().
1310	Return value:
1311	 empty_string - an argument is missing, or servref is not an integer
1312	 anything else - the rule that would be used.
1313
1314	- $encodingctl(GET refnum <OPERATION>)
1315	Get an attribute of a recode rule:
1316	  -> Returns empty string if <refnum> is not a valid recode rule
1317	  -> Returns empty string if no <operation> specified.
1318
1319	  - $encodingctl(GET refnum TARGET)
1320	  Return the complete "target" part of the rule; this is whatever
1321	  you passed to the /encoding command.
1322
1323	  - $encodingctl(GET refnum ENCODING)
1324	  Return the complete "encoding" part of the rule; this is whatever
1325	  you passed to the /encoding command.
1326
1327	  - $encodingctl(GET refnum SERVER_PART)
1328	  Return the 'server part' of the target.  This is the part before
1329	  the slash, or the empty string if there is no server part.
1330
1331	  - $encodingctl(GET refnum TARGET_PART)
1332	  Return the 'target part' of the target.  This is the part after
1333	  the slash, or the empty string if there is no target part.
1334
1335	  - $encodingctl(GET refnum SERVER_PART_DESC)
1336	  This returns nothing for now.  Maybe someday it will return a
1337	  server description (ie, host:port:...)
1338
1339	  - $encodingctl(GET refnum MAGIC)
1340	   1 if this rule is a "system rule" and cannot be deleted.
1341	   0 if this is a user rule, and can be deleted.
1342
1343	  - $encodingctl(GET refnum SOURCE)
1344	   1 - Set at boot-up by using your locale (CODESET)
1345	   2 - Set at boot-up from hardcoded defaults
1346	   3 - Set by the user
1347
1348	- $encodingctl(SET refnum <OPERATION>)
1349	Change an attribute of a recode rule
1350	  -> Returns empty string if <refnum> is not a valid recode rule.
1351	  -> Returns empty string if no <operation> specified.
1352
1353	  - $encodingctl(SET refnum ENCODING new-encoding)
1354	    Empty String - New-encoding was not specified
1355	    0 - Changed: The new encoding was set successfully
1356	   -1 - Not changed: The new encoding does not exist on your system
1357	   -2 - Not changed: The new encoding does not convert to UTF-8
1358	   -3 - Changed: The new encoding PARTIALLY converts to UTF-8
1359
1360	- $encodingctl(DELETE refnum)
1361	Delete a recoding rule:
1362	 Empty String - <refnum> was not a valid recode rule.
1363	 0 - <refnum> is a magic rule and may not be deleted
1364	 1 - <refnum> was successfully deleted.
1365
1366	- $encodingctl(CHECK encoding)
1367	Determine whether or not <encoding> could be used in recoding rules:
1368	  Empty String - <encoding> was not specified.
1369	  0 - Acceptable: The encoding is acceptable for use
1370	 -1 - Unacceptable: The encoding does not exist on your system
1371	 -2 - Unacceptable: The encoding does not convert to UTF-8
1372	 -3 - Partially Acceptable: The encoding PARTIALLY converts to UTF-8
1373
1374	- $encodingctl(CREATE target encoding)
1375	Basically the same thing as /encoding target encoding
1376	Returns the refnum of the new rule.
1377
1378EPIC5-1.1.8
1379
1380*** News 03/11/2014 -- New command, /ENCODING
1381	The /ENCODING command is not really new, but it finally is in its
1382	final form.
1383
1384	With /ENCODING you can specify rules that tell epic what encoding
1385	you think other people are using.  Whenever epic receives a non-utf8
1386	message, it will evaluate the rules to decide what encoding it should
1387	treat the non-utf8 message.  Whenever you send an outbound message
1388	to irc, epic will use the rules to decide if it should encode it
1389	in something other than utf-8.
1390
1391	This means you can talk to non-utf8 users, and their messages can
1392	be made utf8 for you; and your (utf8) messages can be non-utf8 for
1393	them.  This is full end-to-end recoding support.
1394
1395	The rules look like this, and are evaluated with this priority:
1396		6. /ENCODING server/nickname
1397		5. /ENCODING nickname
1398		4. /ENCODING server/channel
1399		3. /ENCODING channel
1400		2. /ENCODING server
1401		1. /ENCODING irc		(the "magic" rule)
1402
1403	In this case, "server" is anything that can be recognized:
1404		* A server refnum
1405		* A server "ourname"
1406		* A server "itsname"
1407		* A server group
1408		* Any server altname
1409
1410	The client will evaluate each rule, and the "best match" is the
1411	first rule that lands highest on that first list.  Hopefully it
1412	should just be natural.  An example:
1413
1414		# All "efnet" servers use ISO-8859-1	(level 2)
1415		/encoding efnet/ ISO-8859-1
1416
1417		# Except #epic, which uses CP437	(level 3)
1418		/encoding #epic CP437
1419
1420		# Except zlonix, who uses KOI8-R	(level 5)
1421		/encoding zlonix KOI8-R
1422
1423	So if you get something non-utf8 message over an "efnet" server,
1424	it will be assumed to be ISO-8859-1.  Unless that message was
1425	sent to #epic -- then it is assumed to be CP437.  Unless that
1426	message was sent by zlonix, then it is KOI8-R.  In this way, you
1427	can set defaults for channels and overrule it by individual person.
1428
1429	SYNTAX:
1430		If you do	/ENCODING <stuff>
1431
1432	If <stuff> is a channel, then <stuff> is treated as a channel.
1433	If <stuff> is a number, then <stuff> is treated as a server refnum.
1434	If <stuff> contains a slash, then anything before the slash is the
1435		server part, and anything after the slash is the channel
1436		or nickname part.  *You can use a trailing slash to make
1437		it unambiguous you mean a server, or a leading slash to
1438		make it unambiguous you mean a channel/nickname.*
1439	If <stuff> contains a dot, then <stuff> is treated as a server.
1440	Otherwise, anything else is treated as a nickname.
1441
1442
1443*** News 03/06/2014 -- $cparse(%X) turns into a ^X
1444	You can use %X in $cparse() to inject a ^X which might make it
1445	easier to handle 256 color support.  All the rules below still apply.
1446
1447		/echo $cparse(%kone %rtwo %X80buckle %XFFmy %X32shoe)
1448
1449*** News 03/05/2014 -- 256 color support (^X works like ^C)
1450	The ^X attribute allows you to set 256 colors (if your emulator
1451	supports that).
1452
1453	The ^X attribute takes two hex digits to indicate a color between
1454	00 and FF (0 to 255).
1455
1456		^X-1			Turn off color
1457		^X00			Turn on fg color 0
1458		....			....
1459		^XFF			Turn on fg color 255
1460		^X<number>,<number>	Turn on <fg>,<bg> colors
1461					The <fg> number can be omitted.
1462
1463	The ^X attribute ALWAYS takes stuff after it.  You cannot use a naked
1464	^X or you risk forwards incompatability.  I *will* be adding more
1465	stuff to ^X in the future so don't develop bad habits.
1466
1467	Caveat:
1468	  256 color support isn't "standard" ansi so the client sends the
1469	  hardcoded sequence ^[[38;5;<number>m  to your terminal.  If your
1470	  terminal does not honor this way of doing 256 colors, then there's
1471	  not much you can do about it...
1472
1473*** News 03/05/2014 -- Italics support
1474	The highlight character ^P now toggles the "Italic" setting of
1475	your terminal emulator.  Mine doesn't support this so I couldn't
1476	test it very well.  Please report any bogons if you use it.
1477
1478*** News 03/02/2014 -- Clarified behavior for /set lastlog 0
1479	It was pointed out that /set lastlog 0 did not do a reasonable
1480	thing with the unified scrollback buffer, so the behavior has
1481	been refined a bit.
1482
1483	Here is how /set lastlog <X> now works
1484	1. For each window, set /window lastlog <X>.
1485	2. For each window, rebuild each window's scrollback
1486	   -- Which may throw away stuff!
1487	   -- If you do /set lastlog 0, it throws away all scrollback
1488	      and does an implicit /window clear!
1489	3. For each window, if <X> is less than twice the window's size,
1490	   /window lastlog <twice its size> (24 lines -> /window lastlog 48)
1491	4. The final value of <X> will be twice the size of the biggest window.
1492
1493*** News 02/14/2014 -- New flags, /LASTLOG -THIS_SERVER and -GLOBAL
1494	The /LASTLOG -THIS_SERVER flag will show all lastlog entries
1495	from any window belonging to the server server as this window.
1496	IE, it is a /lastlog that catch all of this server.
1497
1498	The /LASTLOG -GLOBAL flag will show all lastlog entries from
1499	any window whatsoever.
1500
1501*** News 02/11/2014 -- Auto-detect incorrect encodings lead to warnings
1502	If you have /ENCODING CONSOLE set to non-utf8, and then you type
1503	stuff that looks like UTF8, the client will tell you and suggest
1504	you switch.  This will end the problem with utf8 users seeing
1505	multiple garbage characters on the input line.
1506
1507	If you have /ENCODING CONSOLE set to utf8 and you type something
1508	that is not utf8, the client will tell you and suggest you switch
1509	to something else.  Unfortunately it's not easy to know what you
1510	are using, so it suggests ISO-8859-1.
1511
1512	If you are correctly setting LC_ALL (see below) then the above
1513	should never happen for you.
1514
1515*** News 02/11/2014 -- Now honoring LC_ALL (locale charset settings)
1516	If you set your character set via locale environment variables,
1517	EPIC will now use your locale as the default character set for
1518	/ENCODING console.  If you do not set your locale variables,
1519	then epic will continue to default to ISO-8859-1.
1520
1521*** News 02/11/2014 -- New /ENCODING target "scripts"
1522	Whenever you /load a script, epic needs to convert it into utf8.
1523	The normal way a script can declare itself is via /load -encoding
1524	(See the note from 11/17/2012)
1525
1526        if (word(2 $loadinfo()) != [pf]) { load -pf -encoding CP437 $word(1 $loadinfo()); return; };
1527
1528	If a script is not well-formed utf8 and it does not declare its
1529	own encoding, then it will be assumed to be whatever the value
1530	of /ENCODING scripts is.  The hardcoded default is "CP437".
1531
1532	Naturally, if you /load a script that is not utf8 and is not
1533	CP437, it may not translate correctly.  But it seems most scripts
1534	use CP437, and we'll get everybody to declare/utf8-ify their scripts.
1535
1536*** News 02/10/2014 -- EPIC users now utf8 stransparant to irc.
1537	As of right now, whether you are using utf8 or not, anything
1538	you send from epic will be sent to irc as UTF8.  Anything UTF8
1539	that anybody sends you will be displayed properly on your screen,
1540	even if you are not using UTF8.
1541
1542*** News 02/10/2014 -- New command /ENCODING -- declare target encodings
1543	The new command /ENCODING is used to declare what string encoding
1544	a target is using.  At some point this will spawn into an all-
1545	encompassing feature, but for now, it's just used to declare the
1546	encoding of your console.
1547
1548		/ENCODING console ISO-8859-1
1549	or	/ENCODING console UTF-8		(default)
1550
1551	If EPIC detects that your input is illegal for the encoding you
1552	are using, it will ask you to change it.  If the stuff you type
1553	is not what you think you're typing, again, you might be using
1554	the wrong encoding.
1555
1556*** News 02/09/2014 -- Unicode support for $chr(), new func $unicode()
1557	The $chr() function will now accept unicode descriptors
1558		$chr(U+0415 U+0420 U+20)
1559	The $unicode() function converts text to unicode descriptors
1560		$unicode(�) returns "U+0423"
1561
1562*** News 02/08/2014 -- New server flag, "encoding"  -- WITHDRAWN
1563	Server descriptions now have an extra field "encoding" which is
1564	used when you receive a non-utf8 string from the server.
1565
1566	When you receive a non-utf8 string from the server, epic will
1567	assume it is in this encoding and use iconv() to convert it to utf8.
1568
1569	The default is "ISO-8859-1" for no particular reason.
1570	This will be supplanted by a /recode command in the future!
1571
1572	*** This feature has been removed.  Do not use! ***
1573
1574EPIC5-1.1.7
1575
1576*** News 01/16/2014 -- New scripts (should document these!) from Zlonix
1577	   xmsglog	Encrypted logfiles
1578	   sasl_auth	SASL support (for some networks)
1579	   idlealert	Monitor friends' idle times (with lots of WHOISs)
1580
1581*** News 01/02/2014 -- New status expando, %{4}S, full "itsname"
1582	Just to run this down, here are the %S expandos
1583		%S	Altname 0 (default: Shortened "ourname")
1584			(Only shown when you're connected to multiple servers)
1585		%{1}S	Altname 0 (default: Shortened "ourname")
1586		%{2}S	Full "ourname"
1587		%{3}S	Server Group
1588		%{4}S	Full Server "itsname"
1589
1590*** News 01/02/2014 -- Add /input -- so you can stop arg processing
1591	If you wanted to be able to prompt starting with a hyphen, well,
1592	you couldn't do that before.  But now -- is honored and everything
1593	else is taken as the input prompt.
1594
1595*** News 09/12/2013 -- New built in function $status_oneoff()
1596	This is a completely experimental function right now, which is
1597	helping me decouple the status bar generation from the windows.
1598
1599	This function allows you to create your own status bar string,
1600	if you provide it a window and a status_format.
1601		$status_oneoff(winref ...status goes here...)
1602	As a simple example,
1603		$status_oneoff(1 %S)
1604	would return what %S would be on window 1.
1605
1606EPIC5-1.1.6
1607
1608*** News 07/31/2013 -- New action $LOGCTL(LAST_CREATED)
1609	The $logctl(LAST_CREATED) returns the log refnum of the most recent
1610	log that was created with /LOG NEW or $logctl(NEW).
1611
1612*** News 07/31/2013 -- New action $LOGCTL(NEW)
1613	The $logctl(NEW) performs a /LOG NEW and returns the refnum of the
1614	newly created log.
1615
1616*** News 07/31/2013 -- New /lastlog flag.
1617	/lastlog -regignore [regular-expression] avoids printing lines that
1618	would otherwise be printed without the regex.  Can be used in
1619	combination with -regex and -ignore and the other flags.
1620
1621*** News 07/28/2013 -- $windowctl(REFNUMS_BY_PRIORITY) returns by current-ness
1622	The $windowctl(REFNUMS_BY_PRIORITY) operation returns all windows in
1623	the descending order that they have been the "current window".
1624
1625	This is based on your input screens -- if you have multiple windows
1626	connected to multiple servers, this list doesn't care about that.
1627	If you need that, iterate over the list and filter out the ones
1628	for your server:
1629
1630	fe ($windowctl(REFNUMS_BY_PRIORITY)) x {
1631		if (windowctl(GET $x SERVER) == serverctl(FROM_SERVER)) {
1632			push results $x
1633		}
1634	};
1635	xecho -b Windows for this server in order of current-ness: $results
1636
1637
1638*** News 07/28/2013 -- FIXED-SKIPPED windows don't get channels on /window kill
1639	FIXED-SKIPPED windows (ie, /window fixed on skip on) are used to create
1640	status windows (see below).  They will no longer be given channels
1641	from another window that is killed unless it is the last window
1642	connected to the server.
1643
1644*** News 01/09/2013 -- New /QUEUE flag, -RUNONE
1645	I can't believe I didn't think of this before!
1646	The /QUEUE -RUNONE flag will run the first command in a queue,
1647	leaving the rest of the queue alone.  This will work great with
1648	timer to create a FIFO queue that you can stagger commands through.
1649	For example, a command that slows down output to the server
1650
1651		/TIMER -REPEAT -1 2 {QUEUE -RUNONE serverqueue}
1652		fe (#one #two #three #four) x {
1653			QUEUE serverqueue {join $x}
1654		}
1655
1656EPIC5-1.1.5
1657
1658*** News 11/28/2012 -- Lots of code quality improvements
1659	Ancient graciously set up epic to run under clang and its static
1660	analyzer, and we found lots of suggestions of things to fix.
1661
1662*** News 11/17/2012 -- New flag, /load -encoding
1663	You may now specify what a file's encoding is, and it will be
1664	converted automatically to utf8 (there will be a /set for this
1665	soon enough).  You can use this in your magic bootstrap:
1666
1667	if (word(2 $loadinfo()) != [pf]) { load -pf -encoding iso-8859-1 $word(1 $loadinfo()); return; };
1668
1669	This allows utf8 terminal users to load ascii art in 8859, and
1670	it will Just Work!
1671
1672EPIC5-1.1.4
1673
1674*** News 8/5/2012 -- Anti-foot-shooting for $pad() and $repeat()
1675	Some had mentioned that you shouldn't be permitted to shoot yourself
1676	in the foot by asking for absurdly large output strings in $pad()
1677	and $repeat().  Normally I wouldn't agree to that, but I guess I'm
1678	getting soft in my old age....
1679
1680*** News 8/5/2012 -- /xdebug no_color	- turn off all color unconditionally
1681	The experimental feature /xdebug no_color turns off color support
1682	at the lowest level of the client.  If you refresh your screen,
1683	any previously displayed color will be suppressed.  Turning off
1684	this feature allows any color to be shown again.
1685
1686*** News 8/5/2012 -- /LASTLOG -CONTEXT actually works correctly
1687	The /LASTLOG -CONTEXT feature shows you some lines before and after
1688	any lastlog match.  This has previously been broken and as of the
1689	time I write this, works properly, both normal and -REVERSE.
1690
1691*** News 8/5/2012 -- /ON SET only thrown once when you type the exact name
1692	Previously, if you typed /SET <X> where <X> is the exact name of
1693	any builtin SET, then /on set would be thrown twice.  That was never
1694	the intention, and this has been "fixed".
1695
1696*** News 6/26/2012 -- Merge two windows together -- /WINDOW MERGE otherwin
1697	/WINDOW MERGE is like /WINDOW KILL except it moves everything from
1698	the current window to another window first.  This allows you to
1699	"merge" two windows into one window.
1700	  * Window output
1701	  * Channels
1702	  * Logfiles
1703	  * Queries
1704	  * Timers
1705	If the current window can't be KILLed then everything will be moved
1706	away anyways, but you'll get an error message telling you that it
1707	can't be killed.  This isn't a bug.
1708
1709*** News 6/26/2012 -- Expiring output -- /XECHO -E
1710	The /XECHO -E flag lets you create "expiring output" which will
1711	disappear after however many number of seconds.
1712		/XECHO -E 10 This goes away in 10 seconds!
1713	This might be useful for status windows that you want to show new
1714	messages briefly.
1715
1716*** News 6/24/2012 -- New $hookctl(CURRENT_IMPLIED_HOOK)
1717	When an implied /on hook is being expanded,
1718	$hookctl(CURRENT_IMPLIED_HOOK) is set to the name of that hook.
1719
1720	I recommend wrapping this in an alias:
1721		alias ih {return $hookctl(CURRENT_IMPLIED_HOOK)
1722	Then you can use $ih() to get the hook.
1723
1724	The use case is if you are using the same function for different
1725	implied hooks -- there was no way to tell the function which one
1726	it was working on.
1727
1728*** News 6/24/2012 -- New $dccctl(SET refnum FULL_LINE_BUFFER [0|1])
1729	You can now set a dcc raw to "fully line buffered" mode.
1730	When this is turned on, /on dcc_raw will not trigger until
1731	a complete line is available.  You can turn this off by setting
1732	it to 0.
1733
1734	The corresponding $dccctl(GET refnum FULL_LINE_BUFFER) also works.
1735
1736*** News 6/24/2012 -- New $dccctl(SET refnum PACKET_SIZE <bytes>)
1737	You can now set a dcc raw to "fully packet buffered" mode.
1738	When this is turned on, /on dcc_raw will not trigger until
1739	<bytes> bytes are available.  You can turn this off by setting
1740	it to 0.
1741
1742	The corresponding $dccctl(GET refnum PACKET_SIZE) also works.
1743
1744*** News 06/24/2012 -- New option, /XEVAL -NOLOG
1745	The -NOLOG option to /XEVAL suppresses logging for the command.
1746	The person who requested wanted to do something like this:
1747		alias ll { xeval -nolog {lastlog $*} }
1748	to be able to avoid logging /lastlog output.
1749
1750*** News 06/24/2012 -- New option, /LASTLOG -IGNORE <pattern>
1751	The /LASTLOG -IGNORE <pattern> option allows you to display all of
1752	your lastlog EXCEPT whatever matches <pattern>.  In this way, it
1753	acts as a reverse to the normal way.
1754
1755EPIC5-1.1.3
1756
1757*** News 03/24/2012 -- New status bar expando, %G (Network)
1758	The %G status bar expando shows the 005 NETWORK value for your server
1759
1760*** News 06/09/2010 -- New semantics for /BIND TRANSPOSE_CHARACTERS
1761	The TRANSPOSE_CHARACTERS keybinding now has the following semantics:
1762	1. When the cursor is on the first character, swap the first and second
1763	   characters.
1764	2. When the cursor is on a character (but not the first character), swap
1765	   the character under the cursor with the character before the cursor.
1766	3. When the cursor is at the end of the line (and not on a character),
1767	   swap the last two characters on the input line.
1768	In all three cases, the cursor stays in whatever column it is in.
1769
1770*** News 06/05/2010 -- New script: rejoin
1771	Stores channel/key on disconnect/part/kick. I hope it's useful!
1772
1773	Allows you to rejoin all channels lost in a disconnect, by doing:
1774	/rejoin -all OR /rejoin -server
1775
1776	See script for details.
1777
1778EPIC5-1.1.2
1779
1780*** News 04/15/2010 -- New flags to $sar(), $msar(), case sensitivity
1781	In EPIC4, $sar() and $msar() were case sensitive.
1782	You could turn this off by using the 'i' flag.
1783	In EPIC5, $sar() and $msar() are case *INSENSITIVE*
1784	There has been no way to turn this off!
1785	You can now turn this off with the 'c' flag.
1786
1787	Example:
1788		$sar(g/One/Two/one One one One)   -> "Two Two Two Two"
1789		$sar(cg/One/Two/one One one One/) -> "one Two one Two"
1790
1791*** News 04/15/2010 -- New /on, /on unknown_set
1792	As a favor to howl, I've added /on unknown_set, which will be hooked
1793	whenever /set is called on a set that doesn't exist.
1794		$0  - The set that doesn't exist
1795		$1- - The value the user wanted to set.
1796	If you catch this, then the /on set that triggers for "unknown-set"
1797	will not be thrown.  If you don't know what I'm talking about, then
1798	you won't miss it.
1799
1800*** News 04/01/2010 -- Can now backslash colons in server passwords
1801	Previously it was impossible to include colons in server passwords
1802	because colons are delimiters in server descriptions.  Now you can
1803	backslash the colon and it will do the right thing.  Don't forget to
1804	backslash your backslashes!
1805
1806		Real password		What you should use:
1807		-------------------	---------------------
1808		onetwothree		onetwothree
1809		one:twothree		one\:twothree
1810		one\two:three		one\\two\:three
1811
1812*** News 03/25/2010 -- Can now modify servers by refnum (Fix to server descs)
1813	The /server command was broken in the epic5-1.1.1 release, and got
1814	some extra work for the next release.  As part of this work, you can
1815	now add change fields to a server refnum, like so:
1816		/server 1:type=irc-ssl
1817	Previously refering to a server refnum didn't support change fields.
1818
1819EPIC5-1.1.1
1820
1821*** News 3/19/2010 -- EPIC5-1.1.1 was released here
1822
1823*** News 3/19/2010 -- The last value of /WINDOW SERVER is saved per window
1824	The last argument passed to /WINDOW SERVER is saved on a per-window
1825	basis, via $windowctl(GET x SERVER_STRING).  I added this because
1826	howl asked for it, although I don't know what he intended it for.
1827
1828*** News 3/19/2010 -- Modifying server descriptions on the fly
1829	You may now modify server descriptions on the fly in the
1830	following situations:
1831		/SERVER -ADD <desc>
1832		/SERVER -UPDATE <desc>
1833		/SERVER <desc>
1834		$serverctl(READ_FILE filename)
1835		$serverctl(UPDATE refnum stuff)
1836		/WINDOW SERVER <desc>
1837	For example, let's say you created a server irc.foo.com, but
1838	you forgot that it used SSL.  Before it was a pain to "fix" that,
1839	but now you can fix it like this:
1840
1841		/SERVER -ADD irc.foo.com:8855
1842	(oops, it uses ssl, i forgot!)
1843		/SERVER irc.foo.com:type=irc-ssl
1844	(aha! okie. now it will connect using ssl)
1845
1846*** News 3/19/2010 -- You can log everything with /LOG SERVER ALL
1847	If you create a log like:
1848		/LOG NEW FILE myirc.log SERVER ALL ON
1849	that will log everything.
1850	Previously, you had to add each server individually by
1851	refnum, but now you can just use the magic string "ALL"
1852	to refer to all servers.
1853
1854*** News 3/19/2010 -- Rewrite /log support
1855	The /LOG command should work a lot better now.
1856
1857*** News 3/19/2010 -- New target to msg a window, @E<winref>
1858	You can /echo to a window by /msg'ing its winref, as in:
1859		/msg @E3 This message will display in window 3.
1860
1861*** News 3/19/2010 -- "global" now loads ambig and newnick scripts
1862
1863*** News 3/19/2010 -- New /XEVAL -N flag, which reverses the ^ flag
1864	Normally if you run an alias or an on with ^, it will treat every
1865	command as though it were prefixed with ^.  This suppresses the
1866	output of many commands, which you may not want to do.  You can
1867	negate the effect of ^ with /XEVAL -N.  For example:
1868		/on ^hook "chdir %" {
1869			xeval -n {cd $1-}
1870		}
1871	Normally the /CD command will output an error if it could not
1872	change the directory, but since ^ suppresses that error, in this
1873	example, you'd never know that the cd failed.  So you can wrap
1874	commands whose error messages you want to see in /XEVAL -N.
1875	Don't forget!  Always wrap your commands in {} to avoid unintended
1876	back doors.
1877
1878*** News 3/19/2010 -- Remember, $dccctl(GET refnum WRITABLE)
1879	If you combine $dccctl(FD_TO_REFNUM fd) with
1880	$dccctl(GET refnum WRITABLE) you can detect when a nonblocking
1881	connect has succeeded!
1882
1883*** News 3/19/2010 -- New $dccctl(FD_TO_REFNUM <fd>)
1884	The $connect() function returns a file descriptor, which you can
1885	pass to $dccctl(FD_TO_REFNUM fd) to get the $dccctl() refnum,
1886	which you can use to do other stuff.
1887
1888*** News 3/19/2010 -- New flag to /EXEC, -CLOSEOUT
1889	If you do /EXEC -CLOSEOUT it will close the stdin to the process,
1890	(ie, sends an EOF) which some processes need to decide that
1891	they're supposed to do something.
1892
1893*** News 3/19/2010 --  New scripts I should have documented
1894	These scripts have been added, but I never got around to documenting
1895	them.  That's a bummer.
1896		help.irc	history.rb	locale
1897		tabkey.sjh	logman		cycle
1898		set_color	ban		speak.irc
1899
1900*** News 10/29/2009 -- Valgrind assistance
1901	If you want to run epic under Valgrind, you may want to pass the
1902	--with-valgrind  flag to configure, which will compile in some
1903	additional assistance to help valgrind find memory leaks.  This
1904	support was graciously provided by caf, as were patches for the
1905	bugs he found using valgrind.
1906
1907*** News 07/06/2009 -- The Fish64 xform actually works now (see below)
1908	The first implementation of FISH64 was not actually, to be technical,
1909	compatable with FiSH.  It is a strange thing and it took me a while
1910	to come up with an implementation of it that doesn't depend on how
1911	bits are stored in integers.  I have actually tested it against the
1912	real life FiSH implementation and it's correct now.
1913
1914*** News 06/17/2009 -- New $xform, "FISH64"
1915	The FISH64 transform performs base64 encoding that is compatable
1916	with FiSH.  Fish64 uses the same algorithm as base64, but it uses
1917	a different character set.
1918
1919*** News 06/08/2009 -- New $xform(iconv) functionality
1920	You can now refer to a pre-defined iconv encoding setup,
1921	instead of specifying encoding upon every use of
1922	$xform(iconv). Whereas you in the old days would do:
1923
1924		echo $xform(iconv utf-8/ascii $stuff)
1925
1926	which would take a lot of cpu time, as the client would have
1927	to do a lot of stuff to open, use, and then close up, the
1928	iconv stuff, you can now do as follows:
1929
1930		@ id = iconvctl(ADD utf-8/ascii);
1931		echo $xform(iconv +$id $stuff);
1932
1933	You can also do:
1934
1935		echo $xform(iconv -$id $stuff)
1936
1937	to reverse.
1938		Use /xdebug +unicode to debug iconv stuff!
1939
1940*** News 06/08/2009 -- New control function: $ICONVCTL()
1941	This function works as follows:
1942
1943		@ id = iconvctl(ADD fromcode/tocode[//option])
1944
1945	This sets $id to a permanent identifier for doing encoding
1946	from *fromcode* to *tocode*. (This may speed up encoding a
1947	bit.)
1948		If the chosen encoding isn't accepted by iconv(),
1949	$iconvctl() returns empty.
1950
1951		@ encoding = iconvctl(GET $id)
1952
1953	This will return whatever you set the encoding $id to.
1954
1955		@ iconvctl(REMOVE $id)
1956
1957	This removes the $id from the table of encodings.
1958
1959		@ iconvctl(LIST)
1960
1961	This lists encodings.
1962
1963		@ iconvctl(SIZE)
1964
1965	And this returns the size of the iconv table.
1966
1967	Do notice that identifers are re-used after removal.
1968
1969*** News 06/08/2009 -- Add USERINFO to /on hooks
1970	You can now add some information to "executing hooks".
1971
1972		@ hookctl(USERINFO -1 stuff)
1973
1974	This will set the USERINFO of the current executing hook
1975	to "stuff". To get the userinfo of the current executing hook:
1976
1977		echo $hookctl(USERINFO -1)
1978
1979	This can be used in conjunction with changing the $* of a hook,
1980	to, for instance, add encoding information to a it.
1981
1982*** News 06/06/2009 -- Can change $* in an /on hook now
1983	You can change the value of $* in an /on hook that will affect
1984	/on's with higher serial numbers.
1985		@hookctl(ARGS <level> <new value of $*>)
1986
1987	This is expected to be useful for things like iconv translation.
1988	Please note carefully that the pattern matching of /on's against
1989	$* is done *AFTER EACH ON IS RAN* so if you change $* you might
1990	affect which higher serial numbered /ons will run!
1991
1992	Usually <level> is -1 and usually the new value of $* would be based
1993	on the current value of $*.  The change to $* takes place immediately.
1994
1995	Example one:
1996		on #^hook -100 * {@hookctl(ARGS -1 >>>$0 $1<<< $2-)
1997		on ^hook * {echo $*}
1998		hook This is a test
1999	  would output
2000		>>>This is<<< a test
2001	  because the /on hook with serial number -100 changed the old value
2002	  of $*
2003		"This is a test"
2004	  to
2005		">>>$0 $1<<< $2-"
2006	  which after expansion is:
2007		">>>This is<<< a test"
2008	  which is the value of $* in the /on hook with serial number 0.
2009
2010	Example two:
2011		on #^hook -100 * {@hookctl(ARGS -1 $reverse($*))}
2012		on ^hook "ape" {echo APE! APE!}
2013		hook epa
2014	  would output
2015		"APE! APE"
2016	  because the first hook changes $* from its original value
2017		"epa"
2018	  to $reverse(epa) or
2019		"ape"
2020	  which matches the second hook.
2021
2022*** News 04/10/2009 -- /WINDOW CHANNEL now outputs all channels in the window
2023	Previously, /window channel only output the window's current channel.
2024	It still does that, but now it will also output the full and complete
2025	channel list so you see the other channels in that window.
2026
2027*** News 04/10/2009 -- /IGNORE user@host.com now works again
2028	Due to a really lame bug, /ignore user@host.com did not work
2029	properly because the client thought it was a server name and did
2030	not fix it up to *!user@host.com which prevented it from matching
2031	anything which prevented it from working.  Sorry about that.
2032
2033*** News 04/10/2009 -- Add permitted values for server desc "proto" field
2034	Previously, despite all of the documentation to the contrary, the
2035	only permitted values were "0", "4", and "6" for "either", "ipv4 only"
2036	and "ipv6 only" respectively.  This has been increased so you can
2037	specify any of these values:
2038
2039	For "either ipv4 or ipv6, I don't care" (the default)
2040		0
2041		any
2042		ip
2043		tcp
2044	For "ipv4 only, never use ipv6 for this server"
2045		4
2046		tcp4
2047		ipv4
2048		v4
2049		ip4
2050	For "ipv6 only, never use ipv4 for this server"
2051		6
2052		tcp6
2053		ipv6
2054		v6
2055		ip6
2056
2057	Example to connect to an ipv6 server:
2058		/server irc.ipv6.foo.com:6665:proto=tcp6
2059
2060	Example to connect to a server only using ipv4:
2061		/server irc.foo.com:proto=ipv4
2062
2063EPIC5-1.0
2064
2065*** News 12/25/2008 -- EPIC5-1.0 was released here.
2066
2067EPIC5-0.9.1
2068
2069*** News 12/12/2008 -- Configure will check for perl/ruby/tcl usability
2070	Up until now, configure would include perl/ruby/tcl as long as it
2071	existed and told us where its stuff was at.  That's bad if you
2072	don't install the dev packages, because linking against the
2073	langauage library won't work if it's not there.  Configure will now
2074	try a test-compile to use the language embedding to see if it works
2075	and supports the api we expect.  Failures will cause that language
2076	to be turned off.  Be sure to re-run configure!
2077
2078*** News 12/10/2008 -- New function, $chanlimit(#chan #chan #chan)
2079	The $chanlimit() command works just like $chanmode(), but it
2080	returns the +l argument -- the channel membership limit.
2081	This is by special request of fusion.
2082
2083*** News 12/10/2008 -- Minor change to /SET NEW_SERVER_LASTLOG_LEVEL
2084	Previously, each time you connected to a server (received a 001 reply)
2085	the client would unconditionally assign all of the levels in
2086	/set new_server_lastlog_level to the server's current window.
2087	This is rather annoying if you got disconnected from the server
2088	because the default value is ALL,-DCC and that would clobber all of
2089	your window levels.
2090
2091	Having this brought to my attention, this has been changed to be
2092	more reasonable.  These will now reclaim any unused levels, rather
2093	than unconditionally stealing them from other windows.  Thus, what
2094	/set new_server_lastlog_level ALL,-DCC means is, "each time I connect
2095	to a server, please put any levels that aren't being used by any
2096	window connected to this server in the current window".   I apologize
2097	for the previous behavior which was stupid and shouldn't have survived
2098	as long as it did.
2099
2100*** News 12/10/2008 -- Minor change to /SET OLD_SERVER_LASTLOG_LEVEL
2101	The same change applies when you /window server a window to a server
2102	that is already connected -- it has its window level changed to
2103	/set old_server_lastlog_level, but it will now NOT steal the level
2104	from any other window that already claims it.
2105
2106EPIC5-0.9.0 (EPIC5-0.3.10)
2107
2108*** News 11/24/2008 -- New /window operation, /WINDOW SCROLL_LINES
2109	The /WINDOW SCROLL_LINES operation overrules /SET SCROLL_LINES for
2110	one particular window.  The value may be -1 (which is the default,
2111	and means use /SET SCROLL_LINES) or a positive number.
2112
2113*** News 11/01/2008 -- New /SET, /SET DCC_CONNECT_TIMEOUT
2114	This set will control how long a nonblocking connect for a /dcc get
2115	or /dcc chat can go before the client decides to abandon it.  The
2116	value is in seconds, and 0 turns this off (connects will not time out)
2117	The default value is 30 seconds.  This feature uses system timers,
2118	and you shouldn't change the value of this /set while a connect is
2119	pending or you'll confuse things and your connects probably won't
2120	time out properly.
2121
2122*** News 09/24/2008 -- New script, 'topicbar'
2123	The idea with this script is to use topline 1 of any window
2124	with a channel to display the topic of the given channel.
2125
2126*** News 08/25/2008 -- /SET INPUT_INDICATOR_RIGHT now functional
2127	It was documented below, but the code for it wasn't finished until
2128	today.  So now it will start appearing on your input line.
2129
2130*** News 07/01/2008 -- Add servers from file -- $serverctl(READ_FILE filename)
2131	You may now insert servers into the server list from a file using
2132	$serverctl(READ_FILE filename) where "filename" is the name of the
2133	servers description file.  Note that the servers are appended to the
2134	end of the servers list!  The filename must be in the same format
2135	as the server description file that is loaded at startup.
2136
2137EPIC5-0.3.9
2138
2139*** News 06/25/2008 -- configure --without-wserv, job control
2140	Configure now checks your system to see if it has posix job control
2141	(which means you have setsid() and tcsetpgrp()) and if it does not,
2142	it turns off job-control features:
2143		/BOTMODE
2144		/EXEC
2145		/LOADing of compressed files
2146		$killpid()
2147		$exec()
2148		$open() of compressed files
2149		The -b command line option
2150		External crypto program support
2151		Asynchronous (nonblocking) DNS lookups
2152		Wserv support
2153
2154	You can also use the --without-wserv flag to configure to turn off
2155	wserv support for a system that otherwise supports job control.
2156	There is nothing gained by omitting wserv support, only things
2157	removed.  Normally this flag wouldn't be added but I did it as a
2158	favor to someone.
2159
2160*** News 06/25/2008 -- You can now /ignore a server
2161	Due to some networks (undernet) having annoying servers that
2162	spam you 10-20 times a day with annoying messages you don't want
2163	to receive, it's now possible to /ignore a server:
2164		/IGNORE irc.server.com ALL
2165
2166*** News 05/09/2008 -- Hitting ^C twice interrupts infinite loop
2167	Historically, if you hit ^C twice in a row and the client is stuck,
2168	it will send itself a SIGARLM.  In the past, this was because the
2169	client used blocking connect()s and stuff, and guarded them with
2170	alarm(3)s, so sending SIGARLM would cause an early interruption to
2171	a blocking connect.
2172
2173	Anyways, since we don't have any blocking stuff any more, this is no
2174	longer useful for its intended purpose.  You've been able to send the
2175	client a SIGUSR2 to raise a 'system exception" which attempts to
2176	gracefully end an infinite loop in your script.  Hitting ^C twice
2177	in a row on a stuck client will send a SIGUSR2 which will cause an
2178	infinite loop in your script to terminate.
2179
2180*** News 05/09/2008 -- New /SETs: INPUT_INDICATOR_LEFT, INPUT_INDICATOR_RIGHT
2181	This was written and contributed by fusion.  Thanks!
2182
2183	The input line has been changed so the input prompt is always visible.
2184	When you reach the right or left side of the display, the input line
2185	will still scroll side-to-side, but the input prompt will always be
2186	visible, not just when you're at the start of the input line.
2187
2188	Because it would otherwise not be obvious whether you are at the
2189	beginning of the input line or not, there have been two new /set's
2190	added:
2191		/set input_indicator_left +
2192		/set input_indicator_right  +
2193
2194	When there is more stuff on the input line than what is currently
2195	visible, if the extra stuff is off to the left, the first /set is
2196	used to tell you there is more in that direction.  If the extra
2197	stuff is off to the right, the second set is used to tell you there
2198	is more in that direction.
2199
2200	As of the time of this writing, the support for the second /set isn't
2201	ready yet, so there is no visual clue if you are at the end of the
2202	input line or not.  Keep watching for more info about this.
2203
2204*** News 04/23/2008 -- Added new /on, /ON WINDOW_NOTIFIED
2205	This is hook is thrown when there's activity in a hidden window
2206	that is notified.
2207		$0 - The window refnum
2208		$1 - The level of the activity.
2209	Be careful with this hook, as output defered from it, may
2210	wreak havoc.
2211
2212EPIC5-0.3.8
2213
2214*** News 04/10/2008 -- Added new /on, /ON SIGNAL
2215	You can hook signals with /ON SIGNAL
2216		$0 - The signal that was caught (a number)
2217		$1 - The number of times this signal has been caught
2218		     since the last time /ON SIGNAL was thrown
2219	Not every signal can be caught, and some signals are dangerous
2220	to catch.  For example, no matter what, you can't catch signals
2221	9 (KILL) or 13 (PIPE) 15 (TERM).  It's safe to catch 30 (USR1)
2222	and 31 (USR2), but everything else is entirely at your own risk.
2223	You should /defer anything you do within an /on signal to be safe.
2224
2225*** News 04/10/2008 -- /USERHOST -FLUSH
2226	/USERHOST -FLUSH removes those userhosts which are "pending send"
2227	not those which are "pending receive".
2228
2229EPIC5-0.3.7
2230
2231EPIC5-0.3.6
2232
2233*** News 03/10/2008 -- /NOTIFY list now applicable to local server.
2234	The notify list can now be updated on a per server basis.  This is done
2235	by placing the ":" nick before the list of local changes in the /NOTIFY
2236	command.  Everything on the /NOTIFY line UP TO the ":" is still
2237	applicable to every server.
2238
2239	Examples:
2240	/NOTIFY : - [nicks]  # Clear local list and replace with [nicks].
2241	/NOTIFY - : [nicks]  # Clear all notify lists and add [nicks] locally.
2242
2243*** News 01/28/2008 -- /ON WINDOW_COMMAND has command as $2        (kitambi)
2244	The command being executed is $2 in /on window_command.  If you do evil
2245	things with this, you may crash the client.  You Have Been Warned.
2246
2247*** News 01/23/2008 -- New built in function $check_code(...)
2248	--- Warning --- This function is not really as useful as it looks
2249	because you would be unable to submit an invalid block statement
2250	or expression to the function without getting a warning from the
2251	syntax parser in the first place.  I don't know how I will "fix"
2252	this, but maybe you might find the function interesting for now.
2253
2254	The $check_code() function takes either a *block statement*
2255	(surrounded by curly braces {}) or an *expression* (surrounded
2256	by parenthesis ()) and tells you whether the item is well-formed
2257	and does not have any unmatched braces or parentheses.  It does
2258	*NOT* tell you if the code or expresison inside the item is valid
2259	or even makes sense, it only tells you if it contains code that
2260	you could pass to /eval or to /@.
2261
2262	Return values:
2263		 0 - The expression or block statement looks ok
2264		-1 - This is not an expression or block statement
2265		-2 - The expression/block statement is invalid, probably
2266		     because there is unmatched brace or parenthesis
2267		-3 - There is trailing garbage after the closing brace or
2268		     parenthesis.
2269	More return values will probably be added in the future as more
2270	errors become detectable.
2271
2272*** News 01/22/2008 -- /SERVER listing now shows your vhost
2273	The listing of your servers from /SERVER now shows you the vhost
2274	that you're using (if any).  I forget who asked for this.
2275
2276*** News 01/22/2008 -- Oper passwords no longer revealed with ^L
2277	Wjr pointed out that if you did /oper and typed a password that
2278	was hidden and hit ^L it would reveal the password.  This has
2279	now been fixed.
2280
2281*** News 01/22/2008 -- $ignorectl(SUSPEND) and $ignorectl(UNSUSPEND)
2282	Larne asked for a way to globally turn off /ignores for some
2283	period of time.  So you can turn off all ignores globally
2284	with $ignorectl(SUSPEND) and turn ignores back on again later
2285	with $ignorectl(UNSUSPEND).  A word of caution -- this is a counting
2286	queue, so each SUSPEND must be matched with an UNSUSPEND.  If you
2287	do two SUSPENDs and one UNSUSPEND, it will still be SUSPENDed.
2288	Use $ignorectl(RESET_SUSPEND) if you get the client totaly confused.
2289
2290*** News 01/22/2008 -- You can /load executable files, with caution
2291	Crimedog said that all of his scripts on windows were executable
2292	(+x) and epic wouldn't let him /load them, and so I've removed the
2293	restriction that you can't /load executable files.  I've replaced it
2294	with a warning that the file is executable and that /loading binary
2295	files yields undesirable results.
2296
2297*** News 01/22/2008 -- /xecho -w -1 outputs to current window
2298	As a special favor to BlackJack, /xecho -w -1 will output to the
2299	current window, because this is what epic4 used to do, particularly
2300	when you did /xecho -w $winchan(#foo) and #foo was not a channel
2301	that you were on (so it returned -1) and it output to the curernt
2302	window.  In any other case but -1, /xecho -w to a window that
2303	does not exist will drop the output.
2304
2305*** News 01/22/2008 -- New built in function $strptime()
2306	Now you know the $strftime() function converts a $time() value into
2307	a string using a special format.  If you have the output of strftime
2308	and you have the format it was created with,t he $strptime() function
2309	will return the original $time() value it was created with.  This
2310	is probably useful by people who are parsing logfiles and want to
2311	get a $time() value so they can do time math and see how long ago
2312	something occured.
2313
2314	For the moment, this only works if you have strptime(3) on your
2315	system, and not everybody does.  Very soon, a compat version of
2316	strptime() will be shipped with epic to ensure minimum functionality.
2317
2318*** News 01/05/2008 -- You can now use arglists with /input (fusion)
2319	You can now use arglists with input, like so:
2320
2321	input "Enter command and arguments: " (cmd, args) {
2322		xecho -b You entered [$cmd] and [$args]!
2323	}
2324
2325*** News 01/03/2008 -- $info(o) values for libarchive, iconv support
2326	If the binary supports libarchive, $info(o) will include 'r'.
2327	If the binary supports iconv, $info(o) will include 'v'.
2328	Libarchive support is required to /load from a .zip file
2329	Iconv support is required to be able to do character set translation.
2330
2331*** News 11/29/2007 -- New function $fix_width()
2332	The $fix_width() function takes the following arguments:
2333		cols      $0    Number of columns
2334		justify   $1    Justification (must be "l" for left justify)
2335		fillchar  $2    Fill character (a dword, so use " " for space)
2336		text      $3-
2337
2338	This function returns <text> formatted so that it takes up exactly
2339	<cols> number of columns on the display.  It does this by adding
2340	<fillchar> to the string on either the left or the right or both.
2341
2342	If <text> is already wider than <cols> then it is truncated to <cols>.
2343
2344	<Justify> must be either "l" for left justify, "c" for center, or "r"
2345	for right justify.  Only left justify is supported.  The others are
2346	for future expansion.
2347
2348	This function is intended for creating full width reverse toplines:
2349		@ :cols = word(0 $geom())
2350		@ :str = fix_width($cols l " " blah blah blah blah)
2351		window topline 1 "^V$str"
2352
2353	You will probably want to call $fix_width() in a separate statement
2354	from the /window topline in order to avoid the syntactic confusion
2355	with passing a double quoted word to /window and passing a double
2356	quoted word to $fix_width() (the space).  Trust me.  Don't go there.
2357
2358	In the future, support will be added for right justify and centered.
2359	Please keep watch out in this document for more info.
2360
2361*** News 11/29/2007 -- Support for ZIP files from libarchive
2362	Support for loading files from .zip files has been added.  This first
2363	round of implementation just adds the raw ability, but it's not
2364	totaly ready to be used yet.  You're welcome to start playing with
2365	it and reporting any problems you have.
2366
2367	You can $open() a file for reading or /load it from a zip file:
2368		/load foo.zip/file
2369	and
2370		@fd = open(foo.zip/file R)
2371
2372	If you /load a zip file, it will load the file ".ircrc" in the top
2373	level directory.  This might be enahanced or changed in the future:
2374		/load foo.zip
2375	acts like
2376		/load foo.zip/.ircrc
2377
2378	Some operations cannot be performed on zipped files, such as $fseek()
2379	and $frewind() and so forth.  This might change in the future.
2380
2381	All of this is based on 'libarchive' being installed.  You will need
2382	to re-run configure in order to pick up libarchive support after you
2383	do a cvs update.
2384
2385*** News 10/22/2007 -- New flag to /lastlog, /lastlog -window
2386	The /lastlog -window flag lets you grep the lastlog from a different
2387	window.  The output will still go to the *current* window, however!
2388
2389*** News 09/19/2007 -- Some built in functions now 'builtin' aliases.
2390	Several functions that have been deprecated by $xform() have been
2391	demoted from built in functions to aliases in the 'builtins' script.
2392		encode		decode		b64encode	b64decode
2393		urlencode	urldecode	sedcrypt	sha256
2394
2395EPIC5-0.3.5
2396
2397*** News 09/14/2007 -- New built in function: $splitw(<delim> <string>)
2398	This function takes a <string> which has sections delimited by
2399	<delim>.  The <delim> argument can only be one character.  An
2400	obvious example of this is $PATH which is a <string> that uses
2401	the colon as <delim>.  The <delim> is a dword, so you can use the
2402	space as a delimiter if you needed to.
2403
2404	This function unconditionally converts <string> into a dword list.
2405	You will need to xdebug dword to iterate over the return value, or
2406	you can use $unsplit(" " $splitw(<delim> <string>)) to collapse it
2407	to a uword list (although this is probably pointless)
2408
2409	Example:
2410		@ directories = splitw(: $PATH)
2411	might return
2412		/bin /sbin /usr/bin /usr/sbin /usr/local/bin
2413
2414	Example:
2415		@ foo = splitw(: one:two:three a berry:four:five)
2416	returns
2417		one two "three a berry" four five
2418
2419*** News 09/13/2007 -- New /SET, /SET STATUS_HOLDMODE
2420	This is the value that %{1}H expands to.  The default is " (Hold)".
2421	If you don't like the "(Hold)" in your status bar when your window
2422	is in hold mode but not holding anything, unset this variable
2423	entirely:
2424		/set -status_holdmode
2425	and it will disappear.  Or remove %{1}H from your status format.
2426
2427*** News 09/13/2007 -- New status expando, %{1}H, hold mode indicator.
2428	The %H status expando expands when your window is in hold mode
2429	*and* there is something being held.  But if your window is in
2430	hold mode, but nothing is held, you can't tell just by looking.
2431	So the %{1}H status expando will expand whenever the window is in
2432	hold mode *except* when %H will expando.  This is so you can put
2433			%{1}H%H
2434	in your status format and one or the other (but not both) will
2435	expand at all times hold mode is on.
2436
2437	This expando has been added to the client's default status format.
2438	The value of %{1}H is controlled by /set status_holdmode, and the
2439	default value of that is " (Hold)"
2440
2441*** News 09/13/2007 -- Remember, *0 is an rvalue, but *var is an lvalue
2442	The deref operator ("*") converts a token into an rvalue and then
2443	uses that as an lvalue.  Example:
2444		assign foo bar
2445		@ *foo = [testing]
2446		echo $bar
2447	in the above (*foo) is the same as "bar".  But numbers are different.
2448	Derefing a number yields an rvalue:
2449		alias oofda { @ foo = *0 }
2450		offda one
2451	To convert an argument into an lvalue, deref it a second time:
2452		alias booya { @ *(*0) = 'testing' }
2453		booya varname
2454		echo $varname
2455	Does that make it clear?
2456
2457*** News 09/02/2007 -- New function, $is8bit(string)
2458	This function find the first character of string that has the
2459	eight bit set. Useful to discover Unicode-strings or other
2460	non-eight bit characters.
2461
2462*** News 08/22/2007 -- New xform, $xform(ICONV "from/to" text)
2463	If your binary is built with iconv support (re-run configure before
2464	you tell me it doesn't work!) then you will be able to use iconv()
2465	to translate strings from one character encoding to another.  This
2466	might be useful to experimentally convert to and from utf8 while
2467	you wait for the unicode-enabled input line to be written.
2468
2469XXX Help files updated to here XXX
2470
2471*** News 08/22/2007 -- Checks for iconv in configure: --with-iconv
2472	Configure will now check for libiconv support.  Normally it will
2473	look for libiconv.a and iconv.h in the --prefix/lib and
2474	--prefix/include directory, or in /usr/local or /opt or /usr/opt.
2475	If your iconv support is not in any of these places, then you must
2476	supply the --with-iconv=/path/to/dir where that directory contains
2477	"include/iconv.h" and "lib/libiconv.a"
2478
2479*** News 08/22/2007 -- Checks for alt place in configure: --with-localdir
2480	A lot of times you'll have software installed but it won't be in
2481	the places the compiler looks for it.  Usually this is /usr/local
2482	or /opt or something.  You can use this flag to tell configure to
2483	look in this directory in addition to the default directories.  This
2484	can aid in ensuring optional dependancies don't get turned off because
2485	they're in a directory the compiler doesn't look in.
2486
2487*** News 08/13/2007 -- New /SETs, /SET DEFAULT_REALNAME and DEFAULT_USERNAME
2488	Per a discussion on the list, it was decided to introduce two new
2489	sets, /SET DEFAULT_REALNAME and /SET DEFAULT_USERNAME.  These control
2490	what realname and username should be sent to the server each time you
2491	connect.  Although I can't stop you, you shouldn't unset these
2492	variables if you know what is good for you.
2493
2494	/SET DEFAULT_REALNAME replaces /SET REALNAME, which confused people
2495	who though that /setting it changed their realname immediately
2496
2497	/SET DEFAULT_USERNAME replaces /ircuser which confused people
2498	because they thought it was going to be a /set.
2499
2500*** News 07/20/2007 -- New /SET, /SET LASTLOG_REWRITE
2501	This provides the default value to /lastlog -rewrite whenever you
2502	don't use the /lastlog -rewrite flag.  If you always want the
2503	/lastlog command to timestamp each line, try this:
2504		/set lastlog_rewrite $strftime($1 %T) $8-
2505
2506	(Remember, if you use this in a pf loaded script to double up $'s...
2507		/set lastlog_rewrite $$strftime($1 %T) $$8-		)
2508
2509*** News 07/20/2007 -- New flag to /LASTLOG, /LASTLOG -REWRITE
2510	The /LASTLOG -REWRITE flag rewrites each lastlog line with the
2511	following values for $*
2512		$0  - The lastlog item's unique refnum
2513		$1  - Timestamp (suitable for use with $strftime())
2514		$2  - Window refnum
2515		$3  - Output level
2516		$4  - Reserved for future use
2517		$5  - Reserved for future use
2518		$6  - Reserved for future use
2519		$7  - Output target
2520		$8- - The logical line of output
2521	Not all of these field are intended to be useful -- but I don't
2522	know what sort of imaginative things people might come up with.
2523
2524	Example:  To put a timestamp before every line...
2525		/lastlog -rewrite "$strftime($1 %T) $8-"
2526
2527*** News 07/04/2007 -- New $windowctl() option, $windowctl(GET refnum CHANNELS)
2528	You can now fetch all of the channels in a window by using
2529		$windowctl(GET <refnum> CHANNELS)
2530	There is no defined order to the channels returned.
2531
2532*** News 07/02/2007 -- Clarification of single-indirection implied hooks
2533	Earlier, I said...
2534	   You may surround <string> with {}s if you wish, to avoid quoting
2535	   hell.  Match sure to keep your {}s matched up if you do so.
2536	   See the "loadformats" info above for how to practically use this.
2537
2538	But due to a mistake, this never worked correctly.  This is now
2539	fixed.  If you compare the normal two-expansion version:
2540		@ var = [format_send_public]
2541		@ fmt = '<%W$N%n> $1-'
2542		addset $var int
2543		@ hookctl(set list send_public implied \\$var);
2544		set $var $fmt
2545	which ties /on send_public dynamically to the value of
2546	/set format_send_public.
2547
2548	If you wanted to do it directly, and not tie the implied hook to a
2549	variable, you can surround the format in curly braces, like so:
2550		@ hookctl(set list send_public implied {<%W$N%n> $1-})
2551	Remember that curly braces protect the insides from $-expansion,
2552	so for all purposes the inside of {}s is a literal string that is
2553	not expanded except each time the /on is thrown.
2554
2555*** News 07/02/2007 -- Clarification on using $'s in expression parser
2556	The old expression parser used to allow you to use expandos as
2557	lvalues in order to indirectly assign to variables, for example:
2558		alias inc {
2559			@ $0 += 1
2560		}
2561	But this is not supported in the new math parser.  Instead you
2562	have to use the deref operator, like so:
2563		alias inc {
2564			@ *0 += 1
2565		}
2566	which does the same thing.
2567
2568*** News 06/25/2007 -- New flag to /XECHO, /XECHO -AS
2569	The /XECHO -AS flag will output a message to all windows on the
2570	current server.  You can combine this with the -S flag if you want
2571	to output to another server.  This might be good for blasting a
2572	message when you're disconnected from the server.  For another
2573	example, see below.
2574
2575*** News 06/25/2007 -- New window level, SYSERR
2576	The SYSERR window level will now be used for all of those layered
2577	"INFO --" system errors ("syserrs").  The client will make its best
2578	effort to ensure that these messages go to the correct server's
2579	windows, and that /on yell is hooked in the correct server context.
2580
2581	You can combine this with /xecho -as  [see above]...
2582		on ^yell "* INFO -- *" {xecho -as $*}
2583
2584EPIC5-0.3.4
2585
2586*** News 06/02/2007 -- New tranformer: $xform(ALL)
2587	The $xform(ALL) transform ignores the text and returns a list of
2588	all supported tranformers.  If the user didn't compile SSL support,
2589	then you won't be able to use the strong crypto transforms, so this
2590	is a great way to check before trying to use crypto.
2591
2592	Since this is a regular old transform, you can further transform it
2593	any way you want to (if you want to).
2594
2595*** News 06/01/2007 -- More $xform()s added to the list below
2596	Please re-read the list immediately below, it's been updated!
2597
2598*** News 06/01/2007 -- Totaly rewritten $xform(), now actually useful!
2599	Here's the plan -- we're going to do this over again a second time.
2600
2601	$xform("<transformations>" "meta" "meta" text)
2602
2603	Where the <transformation>s are supported by transform_string().
2604	At the time i write this, they are:
2605
2606	Reversable encodings that convert between binary and printable data
2607	and do not require a meta:
2608	     URL             URL encoding
2609	     ENC             Base16 encoding
2610	     B64             Base64 encoding
2611	     CTCP            CTCP encoding
2612             NONE            Straight copy -- data not changed
2613
2614	Reversable encryptions that require a meta value (a password):
2615	     SED             Simple Encrypt Data
2616	     BF              Blowfish-CBC
2617	     CAST            CAST5-CBC
2618	     AES             AES256-CBC
2619	     AESSHA          AES256-CBC with SHA256 digest of the meta
2620	     DEF             Default encryption     (NOT IMPLEMENTED YET!)
2621
2622	Irreversable digest operations that do not require a meta:
2623	     SHA256          SHA256 message digest
2624
2625	You can string together multiple transformations.  Any transformation
2626	that requires a meta value (ie, a cipherkey) should be supplied after
2627	the transformations *in the correct order*.  After this should be the
2628	plain text.  To apply a transformation, prefix its name with a plus sign
2629	("+") and to remove a transformation, prefix its name with a minus sign
2630	("-").  For example, +URL means url encode, and -URL means url decode.
2631
2632	The transformations is a dword (must be surrounded by double quotes if
2633	it contains a space, which it will if you do multiple transformations).
2634	The meta values are dwords (must be surrounded by double quotes if
2635	they contain a space).  These two things make this function behave
2636	differently than functions normally do, so this is a documented
2637	deviancy!
2638
2639	Examples:
2640	     URL-encode a string     $xform(+URL this is a string)
2641	     URL-decode a string     $xform(-URL this%20is%20a%20string)
2642	     SED-cipher a string     $xform(+SED password this is a string)
2643	     SED-decipher a string   $xform(-sed password <whatever>)
2644
2645	More practical examples:
2646	1) Read binary data from a file, encrypt it, and url encode it again.
2647	     @fd = open(file.txt R)
2648	     @data = read($fd 1024)
2649	     @cipher = xform("-CTCP +SED +URL" password $data)
2650	     @close($fd)
2651	     msg someone $cipher
2652
2653	Why does this work?
2654	 -- $read() returns ctcp-enquoted data, so -CTCP removes it
2655	 -- Now we have binary data, so +SED will cipher it
2656	 -- Now we have ciphertext, so +URL will url encode it.
2657
2658	We can send this to someone else, and they can put it in $cipher...
2659
2660	     @newfd = open(newfile.txt W)
2661	     @newdata = xform("-URL -SED +CTCP" password $cipher)
2662	     @writeb($newfd $newdata)
2663	     @close($newfd)
2664
2665	We did the reverse of the above:
2666	 -- We -URL to recover the binary data
2667	 -- We -SED to decrypt it using the password
2668	 -- We +CTCP to put it in a form we can use with $writeb().
2669
2670	Viola!
2671
2672*** News 05/31/2007 -- New math operator, Unary ** operator
2673	The ** unary prefix operator treats its operand as an unexpanded
2674	string, permitting it to be expanded again.  This should remove
2675	most any need to use /eval.  Example:
2676		@ foo = 'this is a string with $var in it'
2677		@ var = 'one'
2678		@ val1 = **foo
2679		@ var = 'two'
2680		@ val2 == **foo
2681	So $val1 is "this is a string with one in it" and $val2 is
2682	"this is a string with two in it".  You can apply this operator
2683	to any rvalue (natch):
2684		@ foo = **[booya $foo booya!]
2685	becomes
2686		@ foo = **[booya this is a string with $var in it booya!]
2687	becomes
2688		@ foo == [booya this is a string with two in it booya!]
2689	Yeah!
2690
2691*** News 05/17/2007 -- New script, 'dcc_ports'
2692	This script adds two new sets:
2693		/set dcc_port_min <number>
2694	and
2695		/set dcc_port_max <number>
2696	which create a port range which will be used by your dcc's.  Each
2697	number in the range will be chosen sequentially (this will be
2698	enhanced further in the future) and any time you change either of
2699	these values you reset the sequence and it goes back to the minimum
2700	port again.  When the port range is exhausted, it will cycle back
2701	again to the minimum port.
2702
2703*** News 05/17/2007 -- Default ports for dcc, recovering from ports-in-use
2704	There are two new features, that sort of complement each other, and
2705	sort of overlap each other.  Whether to use one or the other depends
2706	on how your script is set up and what your needs are.
2707
2708	When you use /dcc chat or /dcc send, but do not use the -p flag to
2709	specify a port, you can create a callback to your script to create
2710	a default port:
2711		@dccctl(DEFAULT_PORT <string>)
2712	The <string> will be expanded with $* being the dcc refnum of the
2713	dcc needing a port number.  The expanded value of <string> will be
2714	used to set the WANT_PORT value (see below).  If a port cannot be
2715	used because it is already in use by someone else, this value will
2716	be expanded repeatedly until it generates a port we can use.
2717
2718	Whenever you use /dcc chat or /dcc send and use -p to bind a port,
2719	and that port is already in use, then /on dcc_lost will be thrown
2720		$0	The person you're sending it to
2721		$1	The dcc type (ie, send or chat)
2722		$2	The filename (url encoded)
2723		$3	The refnum of the dcc
2724		$4	The port that we tried to use that is in use.
2725		$5-	The literal string "PORT IN USE"
2726	It is expected that you will catch this hook and then do
2727		@dccctl(SET $4 WANT_PORT <new port>)
2728	and then the client will try the new port again.  If a port cannot
2729	be used because it is already in use by someone else, this hook will
2730	be thrown repeatedly until you set a port we can use, or you don't
2731	change the port
2732
2733	In either case, if a port is in use, and neither the DEFAULT_PORT
2734	nor /ON DCC_LOST results in the WANT_PORT value being changed, then
2735	the dcc will be considered a failure, and it will be abandoned,
2736	just as it has always been until this change.
2737
2738*** News 05/15/2007 -- New dccctl() value, "WANT_PORT"
2739	You can now get and set the "WANT_PORT" value for a dcc, which
2740	is the value that the -p flag sets.  You can therefore use this
2741	to change the -p flag for the user.  Because this value is only
2742	used at the time the client tries to bind() an inbound address,
2743	changing this value after the dcc has already been offered will
2744	have no effect: it is too late at that point to change the port.
2745
2746*** News 05/15/2007 -- Normalization of the /SAY and /SEND commands
2747	The old behavior:
2748	- /SEND (the command used when you type text) sends a message to
2749	       1) Current Query
2750	    or 2) Current Channel
2751	    or 3) Nowhere
2752	- /SAY (the "empty" command to overrule a query) sends a message to
2753	       1) Current Channel
2754	    or 2) Nowhere
2755
2756	The new behavior:
2757	- /SEND sends a message to
2758	       1) Current Query
2759	    or 2) Current Channel
2760	    or 3) Nowhere
2761	- /SAY sends a message to
2762	       1) Current Channel
2763	    or 2) Current Query		<--- this is the change here
2764	    or 3) Nowhere
2765
2766	So /SAY will now send a message to the current query if you are
2767	not on a channel, rather than silently failing.  Until this change,
2768	there was no way to do this at all.
2769
2770*** News 05/13/2007 -- ***IMPORTANT*** Removal of /SET REVERSE_STATUS_LINE
2771		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
2772	The /set reverse_status_line variable has been removed.  This means
2773	that your /set status_format* variables, and your /window status_format
2774	variables will not be auto-prepended with ^Vs like they have always
2775	been since time immemorial.  You ***MUST*** prepend your status_formats
2776	with ^Vs (control-Vs, ie, the reverse character) if you want them to
2777	appear in reverse.
2778
2779EPIC5-0.3.3
2780
2781*** News 04/11/2007 -- New argument to /xecho, -TARGET
2782	Usually if you wanted to output to a channel's window, you would do
2783		/xecho -w $winchan(#channel) ....
2784	but someone asked (nicely) for a -target flag to /xecho because they
2785	thought that looked nicer.  So now you can do
2786		/xecho -t #channel ...
2787
2788*** News 04/11/2007 -- New serverctl operation "ALLGROUPS"
2789	The $serverctl(ALLGROUPS) operation will return a unique list of all of
2790	the group names used in all your servers.  Do not pass any arguments
2791	to this operation, since that's reserved for future expansion.
2792
2793*** News 04/11/2007 -- New gettable serverctl value, "FULLDESC"
2794	This value returns the fully qualified server description for a
2795	server, suitable for writing into a servers file, or for passing
2796	to /server -add or any old place.  You can only get this value;
2797	you cannot set it, although that's planned for the future.
2798
2799*** News 01/27/2007 -- New serverctl value, "AUTOCLOSE"
2800	Normally a server is automatically closed when the last window
2801	to it is disconnected (or killed).  Many people hate this behavior
2802	and would like to have a server's connect persist even if there
2803	are no windows connected to it.  You can now control this behavior.
2804		@serverctl(SET refnum AUTOCLOSE 0)
2805	The default is 1 (natch).  The behavior of turning this off is
2806	not well understood.  Use with caution, tell me of any troubles.
2807
2808*** News 12/09/2006 -- New configure flag, --with-threaded-stdout
2809	EJB has graciously provided us with a patch to do threaded output.
2810	This code will hopefully work around problems with gnu screen
2811	blocking, causing pinging out of your servers.  You can turn this
2812	code on by using the '--with-threaded-stdout' flag to configure.
2813	This code is sort of experimental at this time, but this is an
2814	officially supported feature, so please do report any problems you
2815	have with it.
2816
2817	If you turn this option on, then $info(o) will include 'o'.
2818
2819*** News 11/17/2006 -- New flag to /userhost, /userhost -extra
2820	The /USERHOST -EXTRA flag causes the present value of a variable
2821	to be appended to the $* value of the results of a userhost query.
2822
2823	Remember that /on 303 and /userhost -cmd are hooked with:
2824		$0	Nickname
2825		$1	+ if oper, - if not oper
2826		$2	+ if away, - if not away
2827		$3	Username
2828		$4	Hostname
2829	and now,
2830		$5-	Contents of the -extra variable
2831
2832	If you do not hook /on 303 or use /userhost -cmd, the contents of the
2833	-extra variable are appended to the output.
2834
2835	Usage:
2836		@ foo = [extra stuff]
2837		USERHOST hop -extra foo -cmd {xecho -b $0!$3@$4 ($5-)}
2838	might output
2839		*** hop!jnelson@epicsol.org (extra stuff)
2840
2841	Remember that the argument to the -extra flag is *an lvalue*
2842	(the name of a variable) and is not literal text!  The lval is
2843	expanded (yeilding an rval) and *that* value is saved, and used
2844	later on.  You can freely change the value of the variable and
2845	that will not affect anything:
2846
2847	Example:
2848		@ foo = [extra stuff]
2849		USERHOST hop -extra foo -cmd {xecho -b $0!$3@$4 ($5-)}
2850		@ foo = [blah blah]
2851	still will output:
2852		*** hop!jnelson@epicsol.org (extra stuff)
2853	because the value is saved at the time you do /userhost.
2854
2855EPIC5-0.3.2
2856
2857*** News 11/04/2006 -- $shift() and $unshift() changed like $push() and $pop()
2858	In the same way that $push() now only takes two arguments, $unshift()
2859	now takes only two arguments, an lval, and an unquoted dword:
2860		@ foo = [one two]
2861		@ unshift(foo three four)
2862			($foo is one two "three four")
2863
2864	In the same way that $pop() now only takes one argument, $shift()
2865	now only takes one argument, an lval:
2866		@ foo = [one two three]
2867		@ booya = shift(foo)
2868			($booya is one and $foo is two three)
2869
2870*** News 11/04/2006 -- The /xdebug command now takes a block argument
2871	You can temporarily change the /xdebug value for a block of
2872	statements, and have the original value restored, all in one
2873	operation:
2874
2875		xdebug dword { @push(bar "one two") }
2876		@ foo1 = leftw(1 $bar)
2877			($foo1 is "one)
2878		xdebug dword { @ foo2 = leftw(1 $bar) }
2879			($foo2 is "one two")
2880
2881*** News 11/04/2006 -- New built-in function, $curcmd() (nullie)
2882	With this one you know what command is currently executing. For
2883	instance, you might want to not timestamp lines generated by
2884	/lastlog to avoid having doubled timstamps, or prepend them with
2885	something else than timestamps.
2886
2887	Example:
2888
2889	/set output_rewrite ${ curcmd() == [lastlog] ? [Lastlog:] : Z} $1-
2890
2891*** News 11/4/2006 -- Changes to how $push() works with dwords
2892	Up until this time, the $push() function treated the arguments
2893	as a list of words, rather than a single word that needed to be
2894	added.  This caused confusion because people didn't have a way
2895	to add a word atomically.  For example:
2896
2897		xdebug dword
2898		assign foo one two
2899		@push(foo three four)
2900		echo $foo                 returns   one two "three four"
2901
2902	So from now on, $push() takes two arguments, an lvalue, an a
2903	single *unquoted* dword.  If the dword contains spaces, then it
2904	will be quoted before added to the variable (as above)
2905
2906*** News 11/4/2006 -- Changes to how $pop() works (along with dwords)
2907	Up until this time, the $pop() function has had two conflicting
2908	behaviors, that ambiguously overlapped:
2909		$pop(word word word word)
2910		$pop(lval)
2911	But what happens if you have a word list with only one word?
2912	For this reason, $pop() wasn't really useful, and people avoided
2913	using it.  So I've removed the ambiguity by removing the first
2914	case, which isn't used.
2915
2916	If you want to $pop() off a word list, use $rightw(1 <word list>)
2917	which has the proper behavior.
2918
2919	Further, to differentiate $rightw() from $pop(), the $pop()
2920	function returns an *dequoted string*, as in this example:
2921
2922		assign foo one two "three four"
2923		xdebug dword
2924		echo $rightw(1 $foo)       returns "three four"
2925		echo $pop(foo)             returns three four
2926
2927*** News 10/25/2006 -- New field for server descriptions, 'vhost'
2928	You may now specify per-server virtual hostnames ("vhosts")
2929	by using the "vhost" field in a server descrpition.
2930
2931	Example:
2932		/server irc.foo.com:vhost=my.other.hostname.com
2933
2934	Obviously the value you set for vhost must be a value that
2935	you could use for /hostname; that is, a hostname or p-addr
2936	that resolves to an address your machine will let you bind().
2937	Specifying a vhost for the wrong protocol will malfunction.
2938	 (For example: /server irc.foo.com:pr=4:vhost=[ff::ff] )
2939
2940*** News 09/24/2006 -- New /ON, "WINDOW_SERVER" (nullie)
2941	This new hook will trigger every time window's server is
2942	changed. This might be useful for purging window-related data
2943	such as scripted window-to-channel associations. The params are:
2944
2945	$0 - affected window's refnum
2946	$1 - old server
2947	$2 - new server
2948
2949*** News 09/19/2006 -- New /ON, "UNKNOWN_COMMAND" (nullie)
2950	The hook is thrown whenever an unknown command is entered on the
2951	command line or specified in a script. This way, you can
2952	complete a partial command name with an ambiguous hook. The
2953	params are:
2954
2955	$0 - command being unknown
2956	$1 - parameters, if any
2957
2958*** News 09/19/2006 -- New /ON, "CHANNEL_LOST" (nullie)
2959	This hook is thrown whenever the client leaves a channel for any reason.
2960	It is meant as a generalized way for clearing channel-related structures
2961	in scripts, instead of having to hook on several other ones (KICK, PART
2962	and SERVER_LOST). The parameters are:
2963
2964	$0 - server refnum where a channel is being destroyed
2965	$1 - channel name
2966
2967	Have one thing in mind, though. This hook isn't necessarily
2968	thrown in current server's context. Instead of $servernick(),
2969	you need to do $servernick($0).
2970
2971*** News 09/18/2006 -- New keybinding, "RESET_LINE"
2972	The "RESET_LINE" keybinding is intended to be used by tabkey and
2973	history recall scripts that need to be able to replace the contents
2974	of the input line without affecting the cut buffer.
2975
2976	The RESET_LINE keybinding takes an argument (naturally) that is
2977	the new value of the input line.  If you don't provide an argument
2978	then the input line is simply cleared.
2979
2980	Example:
2981	   /alias oofda {parsekey reset_line this is your new input line}
2982	   /bind ^I parse_command {oofda}
2983	   (type something and then hit tab)
2984
2985*** News 09/18/2006 -- New field in server description, "proto"
2986	A new (seventh) field, has been added to server descriptions.
2987	This field is named "protocol" (see below) and can be abbreviated
2988	as "pr".  The field restricts what socket protocols you want epic
2989	to use for this server.  Possible values are;
2990		tcp4    or   4		IPv4 only
2991		tcp6    or   6		IPv6 only
2992		tcp     or   any	IPv4 or IPv6, doesn't matter
2993	Naturally, "any" is the default.
2994
2995*** News 09/16/2006 -- Enhancements to server descriptions
2996	You are permitted to skip fields in the server description.  Each
2997	field has a name that you refer to it by:
2998		host	port	pass	nick	group	type
2999
3000	You can change the field by "assignment", like so:
3001		/server irc.foo.com:group=efnet
3002	or
3003		/server irc.foo.com:7005:type=irc-ssl
3004
3005	The server description actually skips to the name field, so
3006	you don't have to specify them in order, you can skip around
3007	however it suits you.  If you skip to a field and then don't
3008	specify the name of the following field, whatever field would
3009	naturally follow is assumed:
3010
3011		/server irc.foo.com:7005:group=efnet:irc-ssl
3012
3013	In this case, you skipped to the 'group' field, and the field
3014	that follows that is 'type', so that is what "irc-ssl' is
3015	assumed to be.
3016
3017	This can be used any place server descriptions are taken,
3018	from /server, to /window server, to ircII.server, to the
3019	command line, everywhere.
3020
3021*** News 09/14/2006 -- WINDOW command will fail if given invalid window refnum
3022	Consider the behavior of
3023		/WINDOW foo KILL
3024	in the two cases where the window 'foo' does and does not exist.
3025
3026	Up until now, if 'foo' existed, it will killed, but if 'foo' did
3027	not exist, this was not an error, and the current window was killed.
3028	Ignoring window refnums that didn't exist was intended as a courtesy
3029	but actually is a hassle, since most people assume that any further
3030	commands will operate only on that window, or not at all.
3031
3032	So this behavior has been changed.  In the above case, if 'foo' does
3033	not exist, then the /window command simply fails at that spot and
3034	all further actions in that statement are ignored.
3035
3036*** News 09/14/2006 -- Some functions no longer support double quoted words
3037        The work was done by nullie.
3038
3039        The following functions have previously supported double quoted
3040        words, but due to popular sentiment, this support is being removed
3041        to make the functions useful with untrusted data (ie, irc stuff)
3042
3043        match           rmatch          userhost        word
3044        remw            insertw         chngw           pattern
3045        filter          rpattern        pop             findw
3046        findws          splitw          diff            sort
3047        numsort         uniq            remws           getsets
3048        getcommands     getfunctions    prefix          rfilter
3049        copattern       corpattern      cofilter        corfilter
3050
3051        The following functions didn't support dwords unless you did
3052        /xdebug extractw.  Nothing has changed for these functions.
3053
3054        leftw           rightw          midw            notw
3055        restw           insertw         chngw           beforew
3056        tow             afterw          fromw           splice
3057
3058        The /FE and /FOR I IN (list) commands previously supported
3059        double quoted words, but now they will not.
3060
3061        You can revert to the epic4 behavior (for now) with /xdebug dword
3062
3063*** News 08/31/2006 -- New serverctl value, $serverctl(GET refnum ADDRSLEFT)
3064	This returns the number of addresses left from the last dns lookup
3065	for the server "refnum".  It's intended to be used like this:
3066		on server_status "% % CLOSED" {
3067			if (serverctl(GET $0 ADDRSLEFT)) {
3068				# epic will be reconnecting...
3069			}
3070		}
3071	This will help nullie write his reconnect script to not trap until
3072	epic is finished with what it wants to do.
3073
3074*** News 08/17/2006 -- Add support for OPERWALL, /ON OPERWALL, OPERWALL level
3075	OPERWALL is an efnet server command which servers send amongst
3076	themselves.  The local server very graciously sends it to you
3077	wrapped in a WALLOPS (big ups to whoever was considerate enough
3078	and made this decision, you made it much easier to support!)
3079	so we peer at WALLOPS and route "OPERWALL - " messages to
3080	/ON OPERWALL and a new OPERWALL window level.  Now black will
3081	stop asking me to add this.
3082
3083	This is all opt-in.  If you don't hook /on operwall, then they
3084	continue going to /on wallops and WALLOPS as they have always done.
3085
3086*** News 08/17/2006 -- Two new server states CREATED and DELETED
3087	When a server is added to the server list, it's initial state is
3088	"CREATED".  Once it is initialized, it is switched to the "RECONNECT"
3089	stage.  So you can trap new servers with:
3090		/on server_status "% CREATED %" {xecho -b New server is $0}
3091
3092	Servers that are deleted are switched to the DELETED state:
3093		/on server_status "% % DELETED" {xecho -b Server $0 going away}
3094	No matter what you do, you cannot stop the deletion of a server.
3095	It is recommended you /defer any changes you make to the server list
3096	from within an /on server_status that traps a server deletion.
3097
3098EPIC5-0.3.1
3099
3100*** News 07/01/2006 -- Revamped /encrypt command
3101	The /encrypt command, which is a legacy ircII command, has been
3102	revamped and a lot of functionality has been added (see below).
3103	The new format looks like this:
3104
3105	/encrypt
3106		See the cipher list
3107
3108	*** Ways to specify the other person (TARGET is a NICK or CHANNEL)
3109	/encrypt TARGET key
3110		Trade messages with 'nick' on all servers using 'key'.
3111	/encrypt 0/TARGET key
3112		Trade messages with 'nick' only on server 0 using 'key'
3113	/encrypt SERVERNAME/TARGET key
3114		Trade messages with 'nick' on server 'name' using 'key'.
3115		'name' can be "ourname", or "itsname"
3116	/encrypt SERVERGROUP/TARGET key
3117		Trade messages with 'nick' on group 'group' using 'key'.
3118	/encrypt ALTNAME/TARGET key
3119		Trade messages with 'nick' on servers with 'altname' using
3120		'key'.
3121
3122	*** Ways to specify the cipher you want to use
3123	/encrypt nick key
3124		Trade SED messages (default)
3125	/encrypt nick key /path/to/program
3126		Trade messages ciphered by an external crypto script
3127	/encrypt -SED nick key
3128		Trade SED messages
3129	/encrypt -SEDSHA nick key
3130		Trade SED messages, using the SHA256 hash of 'key'.
3131	/encrypt -CAST nick key
3132		Trade CAST5-CBC messages
3133	/encrypt -BLOWFISH nick key
3134		Trade BLOWFISH-CBC messages
3135	/encrypt -AES nick key
3136		Trade AES256-CBC messages
3137	/encrypt -AESSHA nick key
3138		Trade AES256-CBC messages, using the SHA256 hash of 'key'.
3139
3140	Compatability and availability of all these is discussed in the
3141	following news bulletin.
3142
3143	AESSHA is the best cipher, but if it's not available, then SEDSHA
3144	is better than SED, but SED is universally compatable.  If you must
3145	use SED, use a very long key string (40 chars)
3146
3147	For backwards compatability, messages ciphered by external crypto
3148	scripts are always sent as SED messages, even though they are not,
3149	technically, ciphered with SED.
3150
3151*** News 06/26/2006 -- CAST5, Blowfish, AES, and AES-SHA encryption support
3152	This only took me 8 years to catch up with ircII!  Yah!
3153	All of this support is provided by the EVP api in OpenSSL.
3154	If you don't have OpenSSL, this won't be supported.
3155
3156	The /ENCRYPT command now takes an argument after the nickname,
3157	which can be either -CAST, -BLOWFISH, -AES, or -AESSHA
3158		/ENCRYPT nick -CAST key
3159		/ENCRYPT nick -BLOWFISH key
3160		/ENCRYPT nick -AES key
3161		/ENCRYPT nick -AESSHA key
3162
3163	The -CAST support is fully compatable with ircII (as of the last
3164	time I tested it) and -BLOWFISH isn't compatable with anything
3165	but your fellow bleeding edgers (since nobody supports that yet).
3166	Same thing with -AES (only supported by EPIC for now).
3167
3168	The Blowfish support is *NOT* compatable with FiSH, because FiSH
3169	has a couple of idiosyncracies (non-standard Base64, supports keys
3170	that are longer than what openssl supports).  It would probably be
3171	more likely that FiSH needs bag-on-the-side support than to be
3172	mainlined into the crypto support...
3173
3174	AES uses a fixed 256 bit key.  This is 32 characters.  If your key
3175	is not 32 characters, it is padded out with nuls (ascii 0).  If your
3176	key is more than 32 characters, it is truncated.
3177
3178	AESSHA runs your key through SHA2 to generate a 256 bit key for AES.
3179	In any other way, it works the same as AES.
3180
3181	SEDSHA runs your key through SHA2 to generate a 256 bit key for SED.
3182	In any other way, it works the same as SED.  Unlike the others, this
3183	does not depend on openssl and is always available.
3184
3185	Please remember, when you /ENCRYPT a target, everything you send to
3186	that target is encoded.  This includes /CTCP requests (/DCC offers).
3187	Because ircII does not do CTCP-over-CTCP, you won't be able to send
3188	/DCC SEND or /DCC CHAT offers to ircII users, but it will work with
3189	EPIC users.
3190
3191*** News 06/24/2006 -- New ON, /ON NUMERIC
3192	The /ON NUMERIC hook is thrown for all numerics that you do not
3193	catch with a more specific /ON <number>.  For example:
3194		/ON 318 * {echo Numeric 318 -- $*}
3195		/ON NUMERIC * {echo Not Numeric 318 -- $*}
3196	This can be used to unilaterally replace the default format for
3197	numerics that you don't otherwise catch, without having to actually
3198	catch all of them!  The expandos are:
3199		$0	The numeric being thrown
3200		$1	The server who sent the message
3201		$2-	The message
3202
3203*** News 06/24/2006 -- New script, 'reconnect' from nullie
3204	The script causes the client to reconnect to disconnected servers after
3205	a certain period (/SET reconnect_time, measured in minutes), cycling
3206	between servers in a given servergroup. To register given servergroup
3207	for its use, use "/NETWORK ADD group". With conjunction with the
3208	autojoin scripts, allows the user to automatically rejoin channels he
3209	was on before a disconnect.
3210
3211*** News 06/24/2006 -- New script, 'renumber' from nullie
3212	The script adds an alias (/RENUMBER), filling "gaps" in window numbers.
3213	If /SET renumber_auto is set (defaults to OFF), this will be performed
3214	automatically after a window is closed.
3215
3216*** News 06/24/2006 -- New script, 'floodprot' from nullie
3217	This script buffers all outgoing data sent by the client before
3218	transmitting it to the remote server, to avoid "Excess Flood"
3219	disconnection, e.g. pasting a lot of text or sending a lot of /MODE
3220	commands.
3221
3222	/SET floodprot_burst decides how many lines can be sent immediately
3223	after an idle period.
3224
3225*** News 06/24/2006 -- New script, 'autoquery' from nullie
3226	The script creates new windows for incoming private messages, one per
3227	each sender.
3228
3229	/SET autocreate_split_queries (defaults to OFF) decides whether windows
3230	will be split (ON) or hidden (OFF).
3231
3232*** News 06/24/2006 -- New script, 'autojoin' from nullie
3233	The script maintains a list of channels to join upon connecting to a
3234	server. For user-defined channels that are joined after every connect,
3235	create an ~/.irc/channels file with one line for each channel to join
3236	in the specified format:
3237
3238	<channel>   <winnum>  <servergroup> [key]
3239
3240	For instance:
3241
3242	#epic       2         efnet
3243	#secretchan 3         somenet       qwerty
3244
3245	If the reconnect script is loaded and given server's group is added
3246	via /network add, the script will automatically rejoin channels on
3247	which user was before a disconnect, remembering the keys.
3248
3249*** News 06/24/2006 -- SEND_LINE does SCROLL_FORWARD in HOLD_MODE
3250	For those who use HOLD_MODE, if you accidentally scroll back, you
3251	might find yourself trapped in a place where hitting <enter> (the
3252	SEND_LINE keybinding) does not get you back current.  To avoid this
3253	unfortunate situation, if you are in HOLD_MODE, then SEND_LINE
3254	keybinding (the <enter> key) will now always advance you forward a
3255	page, even if you are in scrollback mode.
3256
3257*** News 06/24/2006 -- Support for MAILDIR maildrops, /SET MAIL_TYPE
3258	If you /SET MAIL_TYPE MAILDIR, epic will check your maildir maildrop
3259	for email instead of your mbox maildrop.  You can /SET MAIL_TYPE MBOX
3260	to switch back to mbox.
3261
3262	You must set the MAILDIR (or MAIL) environment variable to point to
3263	your maildrop.  For MAILDIR, your maildrop is the directory that
3264	contains the 'new' and 'cur' subdirectories.
3265
3266	EPIC will check your 'new' directory for new emails.  This support
3267	works the same way for maildir as it does for mbox:
3268
3269		/on mail  (maildir)		/on mail (mbox)
3270		$0 -- New emails in 'new'	$0 -- New emails in 'mbox'
3271		$1 -- Total emails in 'new'	$1 -- Total emails in 'mbox'
3272
3273	The maildir support does not look in 'cur' or anywhere else.
3274
3275*** News 06/24/2006 -- Nonblocking SSL negotiation
3276	Connections to ssl-enabled servers have an SSL protocol negotiation
3277	stage between the nonblocking connect() and irc protocol negotation.
3278	Traditionally, this SSL negotation has been blocking, but this can
3279	take a long time, during which the client is locked up.  So now
3280	SSL negotiations are nonblocking.  Yay.
3281
3282	Previously, the server state goes from CONNECTING to REGISTERING.
3283	But if it has to take a detour for nonblocking ssl negotation, it
3284	will go from CONNECTING to SSL_CONNECTING and then to REGISTERING.
3285
3286*** News 06/24/2006 -- New script, 'nickcomp' from Blackjac
3287
3288*** News 06/06/2006 -- Much improved configure support for perl/tcl/ruby
3289		*** VERY IMPORTANT FOR PACKAGE MAINTAINERS ***
3290
3291	The code in the 'configure' script that decides how to integrate
3292	perl, tcl, and ruby has been rewritten.  For the most part, it
3293	should automagically work.  Here's the details:
3294
3295	PERL:
3296		--with-perl
3297		--with-perl=yes
3298		--with-perl=/usr/local/bin/perl
3299		--with-perl=no
3300		--without-perl
3301	By default, unless you specify --without-perl (or --with-perl=no),
3302	configure will look for the 'perl' program in your path (or use the
3303	perl you specify) and will interrogate the extmod package for details
3304	how to compile sucessfully against perl.  If the default 'perl' binary
3305	is fine, you need do nothing at all.  Otherwise, all you need know
3306	is what 'perl' binary you want to use.
3307
3308	RUBY:
3309		--with-ruby
3310		--with-ruby=yes
3311		--with-ruby=/usr/local/bin/ruby
3312		--with-ruby=no
3313		--without-ruby
3314	Same deal as with perl.  Configure will use the 'ruby' program (or
3315	the one you specify) to get all the details necessary to get support
3316	for ruby.  For most people, you need do nothing at all.
3317
3318	TCL:
3319		--with-tcl
3320		--with-tcl=yes
3321		--with-tcl=/usr/local/lib/tclConfig.sh
3322		--with-tcl=no
3323		--without-tcl
3324	TCL is a little different.  It looks for a 'tclConfig.sh' file.
3325	These ones are used by default (in this order)
3326		/usr/lib/tclConfig.sh
3327		/usr/local/lib/tclConfig.sh
3328		/usr/local/lib/tcl8.4/tclConfig.sh
3329	If your tclConfig.sh is not in one of these places, or if you want
3330	to use a specific tcl version, you must specify the path to the
3331	tclConfig.h file to --with-tcl.
3332
3333	Note to package maintainers:
3334	Please throw away all of the hacks and patches you have in place
3335	to support the old nasty way to set these flags.  I tried to make
3336	this as painless as possible.  If the user has ruby/perl installed,
3337	then ruby/perl support will be included.  The hard part is tcl, since
3338	every system puts their tclConfig.sh in an odd place.
3339
3340*** News 06/06/2006 -- /SET INPUT_ALIASES and /SET CMDCHARS deprecated
3341	Due to recent optimizations in the epic command parser, these two
3342	sets no longer have any function (although they have not yet been
3343	removed).  If you desparately need the use of these /set's, please
3344	let me know.  Otherwise someday they will vanish into the ether.
3345
3346*** News 06/06/2006 -- Support for RUBY: $ruby() and /ruby
3347	Support for ruby (1.6.4 and 1.8.4 are tested) has been added.  The
3348	support is similar to perl and tcl.  You can call out to ruby using
3349	either the $ruby() function or the /ruby command.
3350
3351	The following callbacks to epic are available from within ruby:
3352
3353	EPIC.echo(stringval)		Same as /echo
3354	EPIC.say(stringval)		Same as /xecho -b
3355	EPIC.cmd(stringval)		Run "stringval" without $-expansion
3356	EPIC.eval(stringval)		Run "stringval" with $-expansion
3357	EPIC.expr(stringval)		Return value of epic expression
3358	EPIC.call(stringval)		Return value of epic function call
3359
3360	All of these functions take one argument (a string) and return one
3361	value (also a string).
3362
3363	Some examples:
3364	To export an epic variable to ruby (as a String object):
3365		@ ruby(rubyvar='$epicvar')
3366	or
3367		ruby {rubyvar = EPIC.expr("epicvar")}
3368
3369	To export a ruby variable to epic:
3370		@ epicvar=ruby(rubyvar)
3371	or
3372		ruby {EPIC.expr("epicvar=[#{rubyvar}]")}
3373
3374	To iterate over each item in a ruby collection, passing each
3375	value as the argument to an epic command:
3376		ruby {
3377			something.each {|x|
3378				EPIC.cmd("epiccmd #{x}")
3379			}
3380		}
3381	(Think of using this to do database access)
3382
3383	The EPIC.cmd and EPIC.eval commands do not start off a new atomic
3384	scope within epic.  Consequently, you can read (and write) local
3385	variables that are otherwise in scope:
3386		alias booya {
3387			@ :epiclocal = 5
3388			ruby {
3389				rubyvar = EPIC.expr("epiclocal").to_i
3390				rubyvar = rubyvar + 1
3391				EPIC.expr("epiclocal = '#{rubyvar}'")
3392			}
3393			echo $epiclocal
3394		}
3395	It is *IMPORTANT TO REMEMBER* that because EPIC is untyped, everything
3396	returned to ruby is a String object.  If you have a number in EPIC,
3397	it will be a String in ruby, and you need to explicitly convert it
3398	to an integer (as in the above example).
3399
3400	It is *ALSO VERY IMPORTANT TO REMEMBER* that if you use the /ruby
3401	command, and you use it in a script that is loaded with the standard
3402	(legacy) loader, the loader will insert semicolons into your ruby code
3403	in the places where it would belong if it were ircII code.  Needless
3404	to say, THIS MAY OR MAY NOT ALWAYS BE CORRECT.  The best solution is
3405	to get with the program and switch over to the pf-loader where this
3406	is entirely under your control.
3407
3408*** News 06/06/2006 -- New commands: /PERL and /TCL
3409	Support for perl and tcl has been via the $perl() and $tcl()
3410	functions.  Regretably, calling a function submits the argument
3411	list to quoting hell, which can be particularly painful for perl.
3412	To remedy this somewhat, you can now call a block of perl or tcl
3413	code with these new commands.  The block of code must be surrounded
3414	by curly braces, which protect the inside from quoting hell.
3415	Usage:	/perl { <perl code goes here> };
3416	Usage:	/tcl { <tcl code goes here> };
3417
3418	See the above warnings (for ruby) about using these commands in a
3419	script that is loaded by the standard loader.  Semicolons may be
3420	a problem.  Use the PF loader instead.
3421
3422*** News 06/06/2006 -- Removal of /set highlight_char
3423	The long-threatened removal of /set highlight_char has occurred.
3424	Please use the 'highlight' script for its replacement.
3425
3426*** News 06/06/2006 -- New script, "chanmonitor"
3427
3428*** News 06/06/2006 -- Extra support for 64 bits, if you have it.
3429	Most built-in-functions that take an integer argument will
3430	now support 64 bit integer values.
3431
3432	Further, the following functions can output 64 bits whereas
3433	they never could before:
3434		fseek		numsort		strtol
3435		tobase		tobase		stat
3436
3437EPIC5-0.2.0
3438	EPIC5-0.2.0 was released somewhere in here
3439
3440EPIC5-0.0.8
3441
3442*** News 12/09/2005 -- New window verb, /WINDOW INDENT (ON|OFF)
3443	The /window indent value permits you to tweak the /set indent
3444	value on a per-window basis.  However, if you do /set indent,
3445	it will overwrite all of your per-window indent values (I'm
3446	open to discussion on this), to retain backwards compatability.
3447
3448*** News 12/09/2005 -- New built in function, $xform()
3449	    *** OBSOLETE *** THIS INFORMATION IS OLD *** OBSOLETE ***
3450	This information is no longer useful.  Do not rely on it.  Please
3451	            check out the new documentation up above.
3452	    *** OBSOLETE *** THIS INFORMATION IS OLD *** OBSOLETE ***
3453
3454	The $xform() function does (symmetrical) string transformations.
3455	What is a symmetrical transformation?  It is one in which all of
3456	the bits in the original string are present in the result string,
3457	and the original string can be recreated from the result.  This is
3458	distinct from the idea of hashing, which is closer to being a lossy
3459	compression algorithm.
3460
3461	The general format of the $xform() function is:
3462		$xform(TYPE DIRECTION KEY text)
3463	whereby TYPE is one of the following:
3464		URL	Convert non-printable chars to %HH equivalent
3465			Equivalent to $urlencode() and $urldecode()
3466		ENC	Base16 encoding, for creating variable names
3467			Equivalent to $encode() and $decode()
3468		B64	Base64 encoding, for sending over email/http
3469			Equivalent to $b64encode() and $b64decode()
3470		NONE	No changes (just copies the string)
3471		CTCP	Mangle things they way CTCP ought to be
3472			No equivalent
3473
3474	and DIRECTION is either "E" (for encoding) or "D" (for decoding),
3475	and KEY is ignored except for SED, where it is the cypher used in
3476	the SED bit-twiddling, and DEF where it is the nickname of the
3477	person who it should be transformed for
3478
3479	At the time I write this, SED, CTCP, and DEF are not implemented
3480	yet, but they will be soon.  Watch for more info.
3481
3482	More transformations are expected to be supported in the future
3483	(including real encryption routines).  It will probably be possible
3484	to add your own at some point.
3485
3486*** News 11/28/2005 -- New /ON, /ON KEYBINDING
3487	This on goes off whenever a keybinding is activated:
3488	  $0 - The keybinding that is activated
3489	  $1 - Length of the sequence (future expansion -- always 0 for now)
3490	  $2 - The ascii number of the key that activated it.
3491
3492	Note that $2 only contains the last character in the bound sequence.
3493	In the future, $2- will change to be a word list containing all of
3494	the characters in the sequence.  When this change is made, $1 will
3495	be changed to a positive value.  But for now, $1 is always 0, and
3496	$2 is always just the last character.
3497
3498	If you hook this silently, you will suppress the keybinding!
3499	If you only want to spy on a keybinding, hook it quietly.
3500	The purpose for which this was requested was to be able to trap
3501	everything bound to SELF_INSERT without having to rebind them.
3502
3503	Examples:
3504	To do something every time capital-A is pressed:
3505	   on -keybinding "SELF_INSERT % 65" {echo You pressed A}
3506	To keep the user from using the SWITCH_CHANNELS keybinding.
3507	   on ^keybinding "SWITCH_CHANNELS % *" #
3508
3509*** News 10/30/2005 -- New function, $dbmctl() [hash table support]
3510	*** Notice *** This function uses a custom implementation of SDBM.
3511	The file format it generates should be compatable with $perl() but
3512	is not compatable with ndbm or gdbm.
3513
3514	The $dbmctl() function is an interface to the unix DBM API:
3515	    $dbmctl(OPEN type filename)
3516		Open a DBM file for read and write access.
3517	    $dbmctl(OPEN_READ type filename)
3518		Open a DBM file for read-only access.
3519	    $dbmctl(CLOSE refnum)
3520		Close a previously opened DBM file
3521	    $dbmctl(ADD refnum "key" data)
3522		Insert a new key/data pair.  Fail if key already exists.
3523	    $dbmctl(CHANGE refnum "key" data)
3524		If key already exists, change its data.  If it doesn't exist,
3525		add it.
3526	    $dbmctl(DELETE refnum "key")
3527		Remove a key/data pair
3528	    $dbmctl(READ refnum "key")
3529		Return the data for a key.
3530	    $dbmctl(NEXT_KEY refnum start-over)
3531		Return the next key in the database
3532	    $dbmctl(ALL_KEYS refnum)
3533		Return all keys -- could be huge! could take a long time!
3534	    $dbmctl(ERROR refnum)
3535		Return the errno for the last error.
3536
3537	"Type" must always be "STD" for now.  Reserved for future expansion.
3538	"Filename" must be a filename that doesn't include the ".db" extension!
3539		This is a requirement of the DBM api, and not an epic thing.
3540	"Refnum" is the integer value returned by OPEN or OPEN_READ
3541	"Key" is a hash table key value
3542	"Data" is a hash table data value
3543	"Start-over" is 1 if you want to fetch the first key in the table, and
3544		is 0 if you want to fetch the next key.  You must call this
3545		with 1 before you call it with 0, according to the API.
3546	ALL_KEYS does a "start-over" and you need to do another "start-over"
3547		after using it.
3548
3549*** News 10/29/2005 -- New built in function, $levelctl()
3550	You may now add new window/lastlog/ignore/flood levels at runtime!
3551	Once you add a level, you can use it in your windows, and you can use
3552	it in /xecho -l.  Since ignore and flood control are hardcoded features
3553	adding a level will show up in their types, but will never be used.
3554
3555	The $levelctl() function permits you to add and query levels:
3556	  $levelctl(LEVELS)
3557		Return a space-separated list of all canonical level names.
3558		This does not return any alias names (see below)
3559	  $levelctl(ADD new-name)
3560		Add "new-name" as a new canonical level name.  This new name
3561		is automagically considered part of ALL.  There is no way to
3562		remove levels (yet).  This returns the new level's refnum,
3563		which is a small integer value.  If you try to add a level
3564		that already exists, it is not added again, but it's existing
3565		refnum is returned.
3566	  $levelctl(ALIAS old-name new-name)
3567		Add "new-name" as an alias for "old-name".  An alias name is
3568		permitted anywhere that level names are accepted, but an alias
3569		name is never output by the client -- it is silently converted
3570		into the canonical name.  For example, "OTHER" is the canonical
3571		level name, and "CRAP" is its alias.  If you do
3572			/WINDOW LEVEL CRAP
3573		It will tell you
3574			*** Window level is OTHER
3575	  $levelctl(LOOKUP level-name)
3576		Returns the refnum for a level-name.  The level-name can either
3577		be a canonical level name or an alias level name.
3578	  $levelctl(LOOKUP refnum)
3579		Returns the canonical level name for a refnum.
3580	  $levelctl(NORMALIZE level-name(s))
3581		Given a comma-and-space separated list of level names (like
3582		what you specify to /window level), this returns a canonical
3583		form which is suitable for /save'ing or displaying to the user.
3584		For example,
3585			ALL,-CRAP
3586		would return
3587			PUBLIC MSG NOTICE WALL WALLOP OPNOTE SNOTE ACTION DCC
3588			CTCP INVITE JOIN NICK TOPIC PART QUIT KICK MODE USER1
3589			USER2 USER3 USER4 USER5 USER6 USER7 USER8 USER9 USER10
3590
3591EPIC5-0.0.7
3592
3593*** News 10/12/2005 -- The %D status bar expando (dcc activity) improved
3594	Previously, the %D status bar expando showed you "packets" of
3595	activity.  A packet was 2k of data, so it looked like this:
3596		(      hop: 99 of 2350 (4%))
3597	Now this is all done in reasonable units, like so:
3598		(      hop: 198Kb of 4.7Mb (4.2%))
3599	Perhaps in the future I might remove the "b" after "Kb" and "Mb".
3600
3601*** News 10/12/2005 -- New script 'highlight', removal of highlight ignores
3602	This is kind of experimental for now, but there is a new script
3603	'highlight' which you can /load, which will implement the features
3604	that were previously available via "highlight ignores".  I haven't
3605	yet moved /set highlight_char over to the script, but I will do that
3606	for EPIC5-0.0.8.  If you want to help me make this script more robust,
3607	drop me a line or just /msg me.  If you have no idea what I'm talking
3608	about, don't worry, you're not missing anything.
3609
3610*** News 10/12/2005 -- New built in functions $b64encode() and $b64decode()
3611	The $b64encode() function takes an arbitrary string and returns an
3612	expanded string using the Base64 encoding, which uses all of the
3613	characters A-Z, a-z, 0-9, and + and /.  If you count them up, this
3614	is 64 distinct characters (hence the name base64), which represent
3615	six bits of information.  Thus, 3 bytes of data (24 bits) can be
3616	transformed into 4 characters which are safe to send through data
3617	channels that can only handle text (such as the irc server, or
3618	DCC CHAT, email, or a web server)
3619
3620*** News 10/12/2005 -- Can now set both level and target with with /XECHO
3621	Maybe it would help if I just re-documented /XECHO's options:
3622	XECHO options can always be abbreviated as long as they're not
3623	ambiguous.  For example, /XECHO -CURRENT can be used as /XECHO -C,
3624	and /XECHO -WINDOW can be used as /XECHO -W.
3625
3626	 -CURRENT
3627		The same as -W 0  (output to current global window)
3628	 -LINE <number>
3629		Must be used in conjunction with -WINDOW.  This allows you to
3630		replace the <number>th line on a specified window.  This is
3631		the feature of the old "scratch windows".  All windows behave
3632		as scratch windows these days.
3633	-LEVEL <window-level>
3634		The window levels are of course NONE, CRAP, PUBLICS, MSGS,
3635		NOTICES, WALLS, WALLOPS, OPNOTES, SNOTES, ACTIONS, DCCS,
3636		CTCPS, INVITES, JOINS, NICKS, TOPICS, PARTS, QUITS, KICKS,
3637		MODES, and USER1 through USER10.  If you use this option
3638		without using -WINDOW, then the output will be sent to the
3639		window that claims the corresponding level for the current
3640		server.  If you use this option together with -WINDOW, then
3641		it will be sent to that window anyways.  This is new, because
3642		previously you could not tag output to a window with a level
3643		that didn't belong to that window.
3644	-VISUAL
3645		Output to a visible (non-hidden) window.  If window 0 (the
3646		global current window) is visible, it is used.  If window 0
3647		is hidden, then another visible window is chosen.
3648	-WINDOW <refnum>
3649		Output to a particular window, instead of the normal one.
3650		Remember that window refnum 0 is special, and represents the
3651		global current window which **may or may not** be connected
3652		to the current server.  If you need the current server's
3653		current window, use $serverwin().
3654	-ALL
3655		Output to each and every window.
3656	-BANNER
3657		Prefix the output with the /SET BANNER value.
3658	-RAW
3659		Send the output directly to the terminal and do not attempt
3660		to pre-process it.  This is used to send special control
3661		sequences to your terminal that EPIC does not support (such
3662		as sequences to change your character set)
3663	-NOLOG
3664		Do not allow the line of output to be written to the global
3665		logfile, a window logfile, or to a /LOG logfile.
3666	-SAY
3667		Use say() to output the line, which makes it subject to
3668		output suppression rules.  An example will help:
3669			alias loud { xecho -b This is always displayed }
3670			alias noloud { xecho -b -s This is not always }
3671
3672		In the first case, you could do
3673			loud
3674		or
3675			^loud
3676		and you would still see the output either way.  There is no
3677		way to "suppress" the output.  In the second case
3678			noloud
3679		shows the output but
3680			^noloud
3681		does not.
3682	-X
3683		("Extended" output?)  Ignore /SET DISPLAY_MANGLE for just
3684		this one line, and pretend it was /SET to NORMALIZE instead.
3685		The most obvious use for this would be to output something in
3686		color even when the user has used /set display_mangle to strip
3687		color.
3688	-F
3689		Do not allow the line of output to trigger hidden-window-
3690		notification.  Normally output to a hidden window will cause
3691		that window's refnum to show up in the %F status bar expando.
3692		Using this keeps that from happening.
3693	--
3694		End of argument processing: there are no more arguments after
3695		this and everything else should just be output directly
3696			xecho -- -f <- the -f here is output!
3697
3698*** News 10/05/2005 -- Automatic Scrollback rebuilding, new /WINDOW operation
3699	Whenever the width of a window changes (either because you're
3700	swapping it in, and the screen is a different size than when you
3701	swapped the window out, or because it's visible on a screen that
3702	is changing size), the window's scrollback will be rebuilt.  This is
3703	accomplished by clearing the scrollback and then rebreaking the
3704	lastlog.  If you have a large scrollback and a small lastlog, this
3705	may result in some data lossage.
3706
3707	Although the rebuilding process attempts to keep the top of the window
3708	the same before and after the rebuild, it's possible for what you were
3709	seeing on your window to be gone after the rebuild.  If this occurs,
3710	the window will be set to the very top of the scrollback (ie, as far
3711	back as it can go).
3712
3713	Generally, it is advisable from now on to have a lastlog that is
3714	at least as large as your scrollback, if you want to avoid any
3715	chance of problems when your windows resize.
3716
3717*** News 10/05/2005 -- DNS Helper (hostname lookups) now nonblocking by default
3718	EPIC5-0.0.6 shipped with a dns helper, but it was synchronous (it
3719	did not fork off a subprocess).  It has been debugged and now it is
3720	turned on, and it is asynchronous.  This DNS helper is only used for
3721	server connections.  This is the final stage in making connections to
3722	server fully nonblocking. yay!  However, forking off a child process
3723	to do the nonblocking dns lookup can cause issues with resource
3724	limitations.  (Typically you are only permitted to run a certain
3725	number of processes at a time, and this would count against that limit.)
3726
3727*** News 10/05/2005 -- New /SET, /SET MANGLE_DISPLAY, many sets removed
3728	There is a new /SET, /SET MANGLE_DISPLAY, which mangles all output
3729	being sent to your display, naturally.  It works in the same way
3730	that /set mangle_inbound, mangle_outbound, mangle_logfiles works,
3731	and its default value is "NORMALIZE".  You should always specify
3732	either "NORMALIZE" or "MANGLE_ESCAPE" -- if you turn off both, then
3733	it will be possible for remote people on irc to send raw escape
3734	sequences to your display, and that is bad!
3735
3736	The following /SETs have been superceded by recent changes, and have
3737	been removed:
3738		alt_charset 	blink_video 	bold_video
3739		color		display_ansi 	display_pc_characters
3740		inverse_video	underline_video
3741
3742*** News 10/05/2005 -- Functions that changed because of unified mangler
3743	$leftpc(<COUNT> <TEXT>)
3744		This function performs a $stripcrap(NORMALIZE <text>) now.
3745	$numlines()
3746		This function performs a $stripcrap(NORMALIZE <text>) now.
3747	$printlen(<TEXT>)
3748		This function performs a $stripcrap(NORMALIZE <text>) now.
3749	$stripansicodes(<TEXT>)
3750		This function is the same as $stripcrap(NORMALIZE <text>)
3751	$stripc()
3752		This function is the same as $stripcrap(COLOR <text>)
3753	$stripcrap()
3754		See below for important information.
3755
3756*** News 10/05/2005 -- Unified string mangler/normalizer
3757	Forget everything you thought you knew about the old mangler and
3758	normalizer (sorry!).  This is (believe it or not) much less complicated
3759	than before, and certainly more well documented than before!
3760
3761	EPIC5 now includes a unified mangler/normalizer that is used by the
3762	following features:
3763		(The above functions)
3764		The input prompt
3765		/lastlog -mangle
3766		/log mangle
3767		/set mangle_inbound
3768		/set mangle_outbound
3769		The status bar
3770
3771	All characters are grouped into one of 9 "types":
3772	0	Normal chars 		32-127, 160-255
3773	1	High bit control chars	128-159
3774	2	Escape char 		^[
3775	3	Color char 		^C
3776	4	Highlight toggle	^B ^E ^F ^O ^V ^_
3777	5	Unsafe char		^M (\r)
3778	6	Control char		^@ ^A ^D ^H ^K ^L ^N ^P ^Q
3779					^R ^T ^U ^W ^X ^Y ^Z ^\ ^] ^^
3780	7	Beep			^G
3781	8	Tab			^I
3782	9	Non-destructive Space	^S
3783
3784	There are the 12 following mangle types:
3785	MANGLE_ESCAPES	NORMALIZE	STRIP_COLOR		STRIP_REVERSE
3786	STRIP_UNDERLINE	STRIP_BOLD	STRIP_BLINK		STRIP_ND_SPACE
3787	STRIP_ALT_CHAR	STRIP_ALL_OFF	STRIP_UNPRINTABLE	STRIP_OTHER
3788
3789	The mangle types transform the characters, according to this table:
3790	-----------------------------------------------------------------------
3791        A = Character or sequence converted into an attribute
3792        M = Character mangled (ie, ^A into ^VA^V)
3793        S = Character stripped, sequence (if any) NOT stripped
3794        X = Character stripped, sequence (if any) also stripped
3795        T = Transformed into other (safe) chars
3796        - = No transformation
3797
3798						Type
3799				0    1    2    3    4    5    6    7    8    9
3800	(default)               -    -    -    -    A    -    -    T    T    T
3801	NORMALIZE               -    -    A    A    -    X    M    -    -    -
3802	MANGLE_ESCAPES          -    -    S    -    -    -    -    -    -    -
3803	STRIP_COLOR             -    -    -    X    -    -    -    -    -    -
3804	STRIP_*                 -    -    -    -    X    -    -    -    -    -
3805	STRIP_UNPRINTABLE       -    X    S    S    X    X    X    X    -    -
3806	STRIP_OTHER             X    -    -    -    -    -    -    -    X    X
3807	(/SET ALLOW_C1)         -    X    -    -    -    -    -    -    -    -
3808	-----------------------------------------------------------------------
3809
3810	There are only *three* ambiguous cases:
3811	* Type 2:
3812		MANGLE_ESCAPES has first priority, then NORMALIZE, and
3813		finally STRIP_UNPRINTABLE
3814	* Type 3:
3815		STRIP_UNPRINTABLE has first priority, then NORMALIZE, and
3816		STRIP_COLOR.  You need to use both NORMALIZE and STRIP_COLOR
3817		to remove color changes in escape sequences
3818	* Type 6:
3819		STRIP_UNPRINTABLE has first priority over NORMALIZE.
3820
3821*** News 10/05/2005 -- "ANSI" mangle type linked to "NORMALIZE"
3822	The mangler type "ANSI" has been renamed to "NORMALIZE".  You can
3823	continue to use "ANSI", but it will be silently changed to "NORMALIZE"
3824	internally.
3825
3826*** News 10/05/2005 -- New behavior for $mask() [jm]
3827	Jm needs to write me some documentation for this...
3828
3829*** News 08/30/2005 -- De-support of 7-bit-only terminal/emulators
3830	Once upon a time, long long ago, on a planet far away, there
3831	used to be terminals and terminal emulators that did not know
3832	how to handle characters with the 8th bit set.  Thankfully,
3833	nobody uses these any more.  There has been rudimentary support
3834	in ircII clients to support this old hardware, but it is now
3835	unnecessary and only causes to torment people who can't figure
3836	out how to input their 8 bit characters!
3837
3838	/SET EIGHT_BIT_CHARACTERS has been removed, and its behavior is
3839	now hardcoded to the previous "ON" value.  If you really need
3840	7-bit support, epic4 will always have it...
3841
3842*** News 08/30/2005 -- Simplification of display mangling, part one
3843	There are 15 /set's that control how output to the display is
3844	prepared ("mangled").  That's about 14 too many.  The following
3845	/set's are at best historical curiosities and do not serve any
3846	modern purpose.  Their function has been eliminated.
3847
3848	    BEEP_MAX	TAB	TAB_MAX		ND_SPACE_MAX
3849
3850*** News 08/23/2005 -- New /window verb, /WINDOW FLUSH_SCROLLBACK
3851	The /WINDOW FLUSH_SCROLLBACK option, which I already regret the
3852	naming of, deletes all of the items in your scrollback buffer.
3853	Because the scrollback buffer is used to paint your window, your
3854	window will be cleared when you do this.
3855
3856*** News 08/10/2005 -- Mangle level "ALL" does not include "UNPRINTABLE"
3857	This was a mistake, and "ALL" should never have included the
3858	UNPRINTABLE mangle level.  So if you want to do them both, then
3859	just do ALL,UNPRINTABLE.  Although you would never want to do
3860	that, since UNPRINTABLE is more encompassing than ALL.
3861
3862EPIC5-0.0.6
3863
3864*** News 08/08/2005 -- Updated behavior for /DCC GET
3865	Based on a request from larne, the following syntaxes are now
3866	supported for /DCC GET:
3867
3868	* /DCC GET nick file1 file2 ... fileN /directory
3869	This will download one or more files to /directory.
3870
3871	* /DCC GET nick offered-file not-offered-file
3872	This will do a /DCC RENAME get nick offered-file not-offered-file
3873	and then a /DCC GET not-offered file.  You cannot combine this with
3874	the previous syntax.
3875
3876	* /DCC GET nick
3877	Download ALL files that "nick" have offered you.  You can combine
3878	this with the first one, (/DCC GET nick /directory) to download
3879	all files offered to a single directory.
3880
3881*** News 08/06/2005 -- Generalized status bar activity handling
3882	There are three new windowctls, and /window commands to follow
3883	later on.  They allow you to control a new status bar expando %E.
3884	This will take a bit of explanation.
3885
3886	Each window has 11 "activity levels".  An "activity level" is a
3887	format and a $* value.  The activity levels are numbered 0 to 10,
3888	and 0 is special.
3889
3890	Each window has a 'current activity level' which you can set with:
3891		$windowctl(SET <winref> CURRENT_ACTIVITY <number>)
3892	When you set the current activity level to a number 1 to 10, then
3893	the %E status bar expando will replace with that activity level's
3894	format expanded against that activity level's data.  The activity
3895	level 0 is not usable, but instead stores default values that are
3896	used if you don't define something else for the activity level.
3897
3898	To set a window's activity level format:
3899		$windowctl(SET <winref> ACTIVITY_FORMAT <number> <string>)
3900	Remember that $'s in <string> need to be doubled, in order to protect
3901	them from being expanded at $windowctl() time.  You do not need to
3902	(and you should not) put quotation marks around <string>.  If you do
3903	not set an activity format for a given level, then the activity format
3904	you set for level 0 will be used as a default.
3905
3906	To set a window's activity level data:
3907		$windowctl(SET <winref> ACTIVITY_DATA <number> <string>)
3908	This is the value of $* that will be used to expand the activity
3909	format each time epic redraws the status bar.  If you do not set
3910	an activity data for a given level, the activity data you set for
3911	level 0 will be used as a default.
3912
3913	So to put this all together, if you set the current_activity value
3914	to 0, then the %E expando will expand to nothing.  If you set the
3915	current_activity level to any value 1 to 10, then it will expand to
3916	the "activity_format" value, which is expanded on the fly using the
3917	"activity_data" value as $*.  If you use a current_activity level that
3918	is missing an activity_format or activity_data value, the values you
3919	set for level 0 are used as defaults.
3920
3921	Example:
3922		$windowctl(SET 1 ACTIVITY_FORMAT 1 ^C3$$*)
3923		$windowctl(SET 1 ACTIVITY_FORMAT 2 ^C4$$*)
3924		$windowctl(SET 1 ACTIVITY_FORMAT 3 ^C7$$notifywindows())
3925		$windowctl(SET 1 ACTIVITY_FORMAT 4 ^C12$$*)
3926		$windowctl(SET 1 ACTIVITY_DATA 0 booya)
3927		$windowctl(SET 1 ACTIVITY_DATA 2 hazmat)
3928
3929	Now if I
3930		$windowctl(SET 1 CURRENT_ACTIVITY 1)
3931	then %E will expand to a green "booya" because the format is
3932		^C$$* and the value of $* is "booya"
3933				(from activity_data 0)
3934	If I then
3935		$windowctl(SET 1 CURRENT_ACTIVITY 2)
3936	then %E will expand to a bold red "hazmat" because the format is
3937		^C4$$* and the value of $* is "hazmat"
3938				(cause I set activity_data 2)
3939
3940	If I then
3941		$windowctl(SET 1 CURRENT_ACTIVITY 3)
3942	then %E will expand to a yellow $notifywindows() that will dynamically
3943	update, because there are two $'s in front of it.  It will ignore the
3944	"booya" because it does not reference $*.
3945
3946	This feature is intended to be used to create a %F workalike that
3947	gives you full and utter control over all aspects of how the expando
3948	will show up, since you get 10 levels, plus a default level, and you
3949	get to control which ones use the default and which ones get their
3950	own custom $* and you control the formats -- you control it all.
3951	Have fun!
3952
3953*** News 08/05/2005 -- New flag to /LASTLOG, /LASTLOG -MANGLE
3954	The /LASTLOG -MANGLE flag takes a mangle description (the thing that
3955	$stripcrap() takes) and mangles each line in the lastlog before
3956	matching against your pattern.  THIS IS VERY EXPENSIVE so you should
3957	not do this unless you really want to.
3958
3959*** News 08/05/2005 -- *** IMPORTANT *** /EXEC -OUT changed
3960	/EXEC -OUT will now output to the window's current target, instead
3961	of to the window's current channel.  The current target is $T, and
3962	is the window's current query (if there is one) or the window's
3963	current channel (if there isn't a query).
3964
3965*** News 08/05/2005 -- Text following unmatched braces/parens/brackets
3966	If an unmatched brace/bracket/paren is found, about 20 chars after
3967	the character will be output in the error message, to help you find
3968	it.  Unfortunately I can't give you line numbers yet.
3969
3970*** News 08/05/2005 -- New server status state, "ERROR"
3971	The "ERROR" status state is used in the following cases:
3972	* DNS lookup failed (DNS -> ERROR -> CLOSED)
3973	* Connect failed (CONNECTING -> ERROR -> CLOSING -> CLOSED)
3974	* Socket write failed (<ANY> -> ERROR -> CLOSING -> CLOSED)
3975
3976*** News 08/05/2005 -- The script "altchan.bj" is renamed to "altchan" ...
3977	... Because we deleted the old (lame) altchan script.
3978
3979*** News 08/05/2005 -- New /set, /SET OLD_MATH_PARSER
3980	To use the old math parser, you need to /SET OLD_MATH_PARSER ON.
3981	This is a promoted version of /xdebug old_math, which you should
3982	no longer use, it will no longer work.  Please make plans to
3983	migrate away from the old math parser in epic5 scripts.
3984
3985*** News 08/05/2005 -- New mangle type, "UNPRINTABLE"
3986	You can now mangle "UNPRINTABLE", which closely models the
3987	/SET NO_CONTROL_LOG variable.  When you mangle UNPRINTABLE, all
3988	characters that are not printable (isgraph() || isspace()) will
3989	be removed, which includes all of the highlight characters.
3990
3991*** News 08/05/2005 -- New script 'ison' from jm
3992	Jm has written a new 'ison' script which implements an ison queue,
3993	and acts as the backend for the 'notify' script which he has also
3994	revamped for this release.  This notify script will soon take over
3995	the notify duties for epic, so it'd be a good thing to test it
3996	before the builtin notify goes away...
3997
3998*** News 08/05/2005 -- New operators, === and !==
3999	The new math parser now supports two new operators, which do case
4000	sensitive string comparisons.  === returns true if the two strings
4001	are the same, and !== returns true if the two strings are not the
4002	same.
4003
4004*** News 08/05/2005 -- *** IMPORTANT *** Case insensitive changes
4005	All case insensitive string comparisons should now be handled in
4006	the CASEMAPPING=ascii sense.  This means '{' and '[' are not equal,
4007	and | and ~ and ] and } are not equal.
4008
4009*** News 08/05/2005 -- 005 CASEMAPPING value now handled (sort of)
4010	Some networks use CASEMAPPING=ascii, which means that the characters
4011	{|} are not the same as [~] as they are when CASEMAPPING=rfc1459.
4012	So in order to keep track of nicks correctly on the former servers,
4013	we now track CASEMAPPING and use it as best we can.
4014
4015*** News 08/05/2005 -- Flexible on patterns can match against themselves
4016	When you do /ON TYPE '<pattern>', the value of $* in the pattern is
4017	the $* of the ON, so you can essentially do self-references.  For
4018	example, this now works...
4019		/on general_privmsg '% $0 *' {
4020			... you sent a message to yourself ...
4021		}
4022
4023*** News 08/05/2005 -- Can set NOTIFY_NAME via $windowctl()
4024	You can $windowctl(SET <refnum> NOTIFY_NAME <stuff>) now, instead
4025	of having to battle with quoting hell with /window notify_name "..."
4026
4027*** News 07/27/2005 -- Extended $userhost() behaviour.
4028	Given a channel name in place of a nick, $userhost() will return the
4029	unknown userhost as it did previously, but as a side effect, it will
4030	attempt to resolve the remaining list of nicks in the given channel
4031	only.  This is a somewhat esoteric feature which should only be useful
4032	for people who use the $serverctl() maxcache feature.
4033
4034*** News 07/27/2005 -- New function $shiftbrace().
4035	Given a variable name, $shiftbrace() will remove the braced expression
4036	at the beginning of the variables value and return it.  This is a
4037	somewhat experimental scripting feature.
4038
4039	/assign qwer {asdf zxcv} {zxcv asdf qwer}
4040	/eval echo $shiftbrace(qwer)  =>  asdf zxcv
4041	/eval echo $shiftbrace(qwer)  =>  zxcv asdf qwer
4042
4043*** News 06/21/2005 -- Many scripts desupported
4044	Many scripts that shipped with epic4 are now unsupported in epic5.
4045	They will always be available at
4046
4047	ftp://ftp.epicsol.org/pub/epic/old-scripts/epic5-old-scripts.zip
4048
4049	but they won't be supported for use with epic5, unless someone
4050	makes a motion to re-support them.  Here are the scripts:
4051
4052	alias		altchan		autokick	autoop
4053	away		basical		columns		dcc_spacefix
4054	dcc_timeout	deban		dig		dns
4055	edit		efnext		environment	events
4056	events.hop	fake-dcc	fe		fe.pf
4057	genalias	hybrid6		imap		ip-to-int
4058	ircprimer	keybinds	killpath	kpstat
4059	langtrans	list		ls		meta
4060	mkpdir		more		mudirc		netsplit.env
4061	newformat	nicks		old-dcc		prefix
4062	recursion	repeat		scandir		sdiff
4063	silent		sound		starutils	stat
4064	status_lag	tabkey.th	tabkey		tc
4065	time		tls		vi-binds	webster
4066	window
4067
4068*** News 06/03/2005 -- New script, "newnick" (blackjac)
4069	The "newnick" script, which is loaded automatically by the 'global'
4070	script [and which you need to load from your startup script if you
4071	like this functionality] implements the functionality of the old
4072	/SET AUTO_NEW_NICK feature, which has recently been removed.
4073
4074	It exposes four /SETs (default values):
4075	  /SET AUTO_NEW_NICK ON
4076		When ON, automaticaly mangle the nickname to ensure that you
4077		can connect to the server without delay.
4078	  /SET AUTO_NEW_NICK_CHAR _
4079		Then character to append to your nickname in the mangling
4080		process.
4081	  /SET AUTO_NEW_NICK_LENGTH 9
4082		The maximum nickname length that can be mangled.
4083	   /SET -AUTO_NEW_NICK_LIST
4084		A list of nicknames to try to use before mangling begins.
4085
4086*** News 06/03/2005 -- New /TIMER flags, and execution contexts.
4087	[ About timer domains ]
4088	Each timer now belongs to one of three domains:
4089		1) Server timers
4090		2) Window timers
4091		3) General timers
4092	A "server timer" is created when you run /TIMER down-wind from
4093	an /ON caused by a server event.  A "window timer" is created
4094	when you run /TIMER at any other time.
4095
4096	[ Forcing a particular type of timer ]
4097	You can manually force a timer to be in a particular domain
4098	with a flag:
4099		/TIMER -SERVER <refnum>		Create a server timer
4100		/TIMER -WINDOW <refnum>		Create a window timer
4101		/TIMER -GENERAL			Create a general timer.
4102
4103	[ When timers go off, they change the current window and server ]
4104	When a timer goes off, if it is a server timer, then it will
4105	switch the default server to its server, and switch the current
4106	window to that server's current window.  If the timer is a window
4107	timer, it switches the current window to its window, and switches
4108	the current server to that window's server.  If the timer is a
4109	general timer, it leaves the current window alone, and switches
4110	the server to the current window's server.
4111
4112	[ When timers go off and their window or server is gone ]
4113	So each server and window timer is "attached" to something, either
4114	a server refnum or a window refnum.  If that thing it is attached to
4115	no longer exists when the timer goes off, then the timer has to either
4116	turn into a general timer (and bind to the current server) or simply
4117	not execute at all.  If you use the -CANCELABLE flag, the timer is
4118	cancelable and will not execute in this case.  The default is to be
4119	non-cancelable and to be treated as a general timer if the window or
4120	server disappears.
4121
4122*** News 06/03/2005 -- The SIGUSR2 signal now supported
4123	If you send epic the SIGUSR2 signal (kill -USR2 pid) from an
4124	outside shell, EPIC will throw a "system exception" which makes
4125	epic give up on whatever it is doing and fully unrecurse.  This
4126	can be used to break out of an infinite loop.
4127
4128*** News 06/03/2005 -- Several builtin /set's removed, now scripted
4129	The following builtin sets which no longer are used in the base
4130	executable have been formally removed.  Many of them have been
4131	implemented by the 'builtins' script.
4132
4133		AUTO_NEW_NICK		AUTO_RECONNECT
4134		AUTO_RECONNECT_DELAY	AUTO_REJOIN_CONNECT
4135		CONNECT_TIMEOUT		HELP_PAGER
4136		HELP_PATH		HELP_PROMPT
4137		HELP_WINDOW		MAX_RECONNECTS
4138		SWITCH_CHANNEL_ON_PART
4139
4140*** News 06/02/2005 -- Your startup script is loaded before connecting
4141	Historically ircII has always loaded your startup script (~/.epicrc
4142	or ~/.ircrc) after you successfully completed your first connection
4143	to a server.  This was to allow you to do irc commands in your startup
4144	script, such as /JOIN and /NICK and /UMODE, etc.  This has now been
4145	changed so your startup script is always loaded at startup before
4146	epic has attempted to connect to a server.
4147
4148	If you need or prefer the prior semantics, please wrap your startup
4149	script in a wrapper like so:
4150
4151		on #^connect -1 * {
4152			... your old ircrc goes here ...
4153			@hookctl(remove -1)
4154		}
4155
4156	What this does is tell epic that you want the body of your script
4157	(the "... your old ircrc goes here ..." part) to be loaded after
4158	you connect to a server, and the @hookctl(remove -1) part makes sure
4159	that the /on deletes itself after it goes off.  This exactly effects
4160	the prior behavior.
4161
4162	The -B command line option continues to be supported, but is ignored
4163	since its behavior is now the default.
4164
4165*** News 06/02/2005 -- Changes to how server descriptions w/o ports get handled
4166	As you may or may not know, epic handles all server descriptions
4167	in a unified way.  Server descriptions are the things that look like:
4168		<hostname>:<port>:<password>:<nick>:<group>:<protocol>
4169
4170	The places you can use a server description ("hostname") are:
4171		/SERVER -ADD <hostname>
4172		/SERVER -DELETE <hostname>
4173		/SERVER +<hostname>
4174		/SERVER -<hostname>
4175		/SERVER <hostname>
4176		/DISCONNECT <hostname>
4177		$serverctl(REFNUM <hostname>)
4178		/XEVAL -S <hostname>
4179		/XQUOTE -S <hostname>
4180		/MSG -<hostname>/target
4181		$winchan(#chan <hostname>)
4182		/LOG SERVER <hostname>
4183		/WINDOW SERVER <hostname>
4184	(Every other place in epic requires a server refnum)
4185
4186	This change makes the following backwards-incompatable change:
4187	When you add the first server for a given <hostname>, the port you
4188	use on that server becomes the default port for that <hostname> in
4189	all other places in epic.  This is true even if you later add other
4190	servers for <hostname> using other ports!
4191
4192	Example 1:
4193			/server -add irc.host.com:6666
4194	adds a new server, we'll call server refnum 0.  So now any place you
4195	use "irc.host.com" (see above) will default to port 6666, and thus
4196	"irc.host.com" will refer to server refnum 0, rather than being an
4197	error.  Furthermore, let's say you do:
4198			/server -add irc.host.com:6667
4199	and this becomes server refnum 1.  The "irc.host.com" continues to
4200	refer to server 0, even though this server uses port 6667.
4201
4202	Example 2:
4203			/server -add irc.host.com:6666
4204	adds a new server, server refnum 0.  Then later on you do
4205			/server irc.host.com
4206	This will connect to server refnum 0, on port 6666, and WILL NOT
4207	create a new server on port 6667 and connect on port 6667!
4208
4209*** News 06/02/2005 -- /QUIT with no arguments uses per-server quit messages
4210	If you do /QUIT with no arguments, then any per-server quit message
4211	that you have previously set with $serverctl() will be used, and will
4212	not be clobbered by /SET QUIT_MESSAGE.  Thus, /SET QUIT_MESSAGE is
4213	only used as a fallback for servers that do not have their own quit
4214	message.
4215
4216*** News 06/02/2005 -- Preliminary support for nonblocking dns for server
4217	DNS lookups for server connections are now done in a nonblocking way.
4218	This code has not been tested very much so it may be unstable.  If you
4219	try to break it, you probably will.  Let me know how you did it.
4220
4221	Nonblocking DNS lookups require the use of a "dns helper" process,
4222	which is fork()ed for every lookup.  Since you only have a limited
4223	number of processes available to you, this means you shouldn't try
4224	to connect to an unreasonable number of servers concurrently.  If you
4225	do manage to do that, you may receive errors.
4226
4227	It should be safe to use /server to cancel a very long nonblocking
4228	dns request.
4229
4230*** News 06/02/2005 -- /WINDOW SERVER shows server list instead of error
4231	Previously /window server without an argument displayed an error
4232	which isn't terribly friendly.  So now it will display the server
4233	list, as if you had done /server without any arguments.
4234
4235*** News 05/10/2005 -- Nickname rejections handled differently now
4236	When the server rejects your NICK change request after you have
4237	already connected and registered with the server, no further
4238	action will take place because there's nothing that can be done
4239	to stop a nick collision, and nothing that needs to be done if
4240	your new nick is taken.
4241
4242	If the server rejects your NICK during the registration process,
4243	epic will no longer "fudge" your nickname by adding _'s and/or
4244	rotating your nickname, and will no longer "reset" your nickname
4245	by prompting you for a new one and stopping the world until you
4246	give it a new one.  Rather, EPIC will throw /on new_nickname and
4247	if you don't use it, will warn you that you need to use /NICK
4248	to choose a new nickname (and /server +<ref> to reconnect if you
4249	ping out)
4250
4251	This also means that /SET AUTO_NEW_NICK is gone (soon to be replaced
4252	by a script, which will implement the old hardcoded behavior), and
4253	handling nickname change failures is fully under control of script!
4254
4255*** News 05/10/2005 -- New window verb, /WINDOW KILLABLE (default on)
4256	When you /WINDOW KILLABLE OFF, the following changes occur:
4257	  * /WINDOW KILL will fail[1] with an error message.
4258	  * /WINDOW KILL_ALL_HIDDEN will not kill the window.
4259	  * /WINDOW KILL_OTHERS will not kill the window.
4260	  * /WINDOW KILLSWAP will fail[1] with an error message.
4261	[1] A failure of *any* /window operation causes any subsequent
4262	    operations in the same statement to be discarded, to avoid
4263	    accidentally operating on the wrong window.  This behavior
4264	    is not a special-case.
4265
4266*** News 05/07/2005 -- New $windowctl(SET <ref> TOPLINE <num> <stuff>)
4267	You can now set a topline literally (without wrangling with the
4268	/window command) this way.  The <stuff> is not subject to any
4269	sort of double-quoting shenanigans.  BTW, don't get too excited,
4270	I haven't implemented any other $windowctl(SET *) operations,
4271	but this one needed to be done right away.
4272
4273*** News 05/02/2005 -- New $serverctl(), $serverctl(GET <ref> LOCALPORT)
4274	This returns the port used by the local side of a connection to
4275	the server.  If the server is not connected, it returns 0.
4276
4277*** News 04/28/2005 -- *** IMPORTANT *** /ON LEAVE changed to /ON PART
4278	This is a hard cut-over breaking of backwards compatability.
4279	There is no way to "go back", but there are means you can take
4280	to compensate:
4281		@type = (info(i) < 1224) ? [LEAVE] : [PART]
4282		on $type * { ..... }
4283	This is the last vestige of the senseless substitution of the
4284	non-irc word "LEAVE" for the irc word "PART".  Good riddens to it
4285	and may it never return again.
4286
4287*** News 04/25/2005 -- /SET -CREATE removed (use /ADDSET)
4288	The /set -create command which was first marked for deletion 6 months
4289	ago has now been removed.  You can use the /addset alias provided by
4290	the "builtins" script to get the same functionality:
4291			/ADDSET <name> <type> {
4292				... callback ...
4293			}
4294	Don't forget to /SET <name> <value> after you do an /addset to give
4295	it an initial value!
4296
4297*** News 04/25/2005 -- *** IMPORTANT *** NEW MATH PARSER NOW DEFAULT
4298	The new math parser, which first appeared in 1998 in EPIC4pre2.001,
4299	and has been stable since early 1999, has now finally been made the
4300	default math parser.  IT IS POSSIBLE THAT VERY BADLY WRITTEN SCRIPTS
4301	OR SCRIPTS THAT DEPEND ON BUGS IN THE OLD MATH PARSER MAY BREAK AS A
4302	RESULT OF THIS CHANGE!
4303
4304	If you need to continue using the old math parser, you can turn it
4305	back on with:
4306			/xdebug old_math
4307	The old math parser won't be going away any time soon, but it will
4308	never again be the default math parser (barring rioting crowds with
4309	effigies and pitchforks at my door...)
4310
4311	The operation /xdebug new_math is now a no-op, and doing it will have
4312	no effect.  YOU CANNOT TURN OFF NEW MATH BY DOING /XDEBUG -NEW_MATH
4313	ANY MORE.  YOU MUST DO THE ABOVE /xdebug old_math.
4314
4315EPIC5-0.0.5
4316
4317*** News 04/18/2005 -- New $windowctl() stuff
4318	$windowctl(GET <win> DISPLAY_SIZE)	to replace $winsize()
4319	$windowctl(GET <win> SCREEN)		to replace $winscreen()
4320	$windowctl(GET <win> LINE <num>)	to replace $winline()
4321
4322*** News 04/18/2005 -- /SET -OLD_SERVER_LASTLOG_LEVEL turns that feature off.
4323	If you /set -old_server_lastlog_level, then the window's level is not
4324	changed when it is connected to an existing server.  This is probably
4325	a bad idea as it can lead to level duplication, the effects of which
4326	are poorly-defined
4327
4328*** News 04/18/2005 -- /SET -NEW_SERVER_LASTLOG_LEVEL turns that feature off.
4329	If you /set -new_server_lastlog_level, then the window's level is not
4330	changed when it is connected to a new server.  This allows you to
4331	completely opt-out of this feature.
4332
4333*** News 04/18/2005 -- New $serverctl() stuff
4334	So $serverctl(LAST_SERVER) and $serverctl(FROM_SERVER) have been
4335	added and are used by the builtins script
4336
4337*** News 04/18/2005 -- Translations now fixed
4338	I apologize to you RUSSIAN_WIN translation users for it being
4339	broken.  This release fixes it up, and the fix was back-ported
4340	to EPIC4.
4341
4342*** News 04/18/2005 -- /SET STATUS_* subformats no longer size limited
4343	Previously, the effective size that /SET STATUS_* values you could
4344	expand to (especially if you have /SET STATUS_DOES_EXPANDOS ON)
4345	as limited on a per-expando basis.  This was inconveniently small
4346	for some people who were using lots of characters doing color
4347	markup, etc.  So all of those limits have been removed.
4348
4349*** News 04/18/2005 -- "ERROR --" changed to "INFO --", not used for exec, dcc
4350	The "ERROR --" io messages were alarming people so they were changed
4351	to "INFO --" in this release.  Further, EXEC and DCC connections do
4352	not output these diagnostic messages.
4353
4354*** News 04/18/2005 -- /XECHO -v outputs to current window if it's visible
4355	/XECHO -v has traditionally output to the first visible window (the
4356	first window on the first screen), but it was agreed that it is more
4357	reasonable to output to the current window if that is visible.
4358
4359*** News 04/18/2005 -- Ways to keep dcc xfers from swamping your cpu...
4360	There are three new ways to keep high speed dcc xfers from swamping
4361	your cpu with unnecessary status bar redraws:
4362
4363	$dccctl(UPDATES_STATUS [0|1])
4364	   Turns off (on) whether or not the %D status bar value should be
4365	   updated whenever any activity occurs.  If you turn this off, then
4366	   %D is frozen until you turn it back on.  The argument is optional,
4367	   and if you don't supply it, it returns the current value.  If you
4368	   do supply it, the old value is returned.
4369
4370	$dccctl([SET|GET] <refnum> UPDATES_STATUS [0|1])
4371	   Turns off (on) whether or not a particular dcc should update the
4372	   %D status bar expando when it has activity.
4373
4374	/ON ^DCC_ACTIVITY * #
4375	   Hooking (and suppressing) /ON DCC_ACTIVITY will prevent the status
4376	   bar from being redrawn as a result of this activity.  This won't
4377	   stop %D from being updated, but it does stop the status bar from
4378	   thrasing uncontrollably.
4379
4380*** News 04/18/2005 -- The "builtins" script (Blackjac)
4381		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
4382	As noted below in "notes for forward compatability", there is a new
4383	script called "builtins" which is loaded by "global" which is not
4384	loaded by default if you have a startup script.  This means it is
4385	really important that you add either /LOAD global or /LOAD builtins
4386	to your ~/.ircrc (or ~/.epicrc) file, or you will notice that the
4387	following features have "disappeared":
4388		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
4389
4390	Commands:
4391		BYE, DATE, EXIT, HOST, IRCHOST, IRCNAME, LEAVE, REALNAME,
4392		SAVE, SIGNOFF, WHOWAS
4393	Functions:
4394		LASTSERVER, SERVERGROUP, SERVERNAME, SERVERNICK, SERVERNUM,
4395		SERVEROURNAME, SERVERTYPE, WINBOUND, WINCURSORLINE, WINLEVEL,
4396		WINLINE, WINNAM, WINNICKLIST, WINNUM, WINQUERY, WINREFS,
4397		WINSCREEN, WINSCROLLBACKSIZE, WINSERV, WINSIZE, WINSTATSIZE,
4398		WINVISIBLE
4399	Sets:
4400		AUTO_REJOIN, AUTO_REJOIN_DELAY, AUTO_UNMARK_AWAY, AUTO_WHOWAS,
4401		BEEP_ON_MSG, COMMAND_MODE, DCC_TIMEOUT, FULL_STATUS_LINE,
4402		NUM_OF_WHOWAS, REVERSE_STATUS_LINE, SHOW_END_OF_MSGS,
4403		SHOW_WHO_HOPCOUNT, VERBOSE_CTCP
4404
4405	Furthermore, the following new commands have been added:
4406		ADDSET, DELSET
4407	which allow you to add a scripted built in /set variable (which
4408	is used extensively by this script).
4409
4410		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
4411	THESE FEATURES NO LONGER EXIST AS HARDCODED EPIC5 FEATURES AND ARE
4412	SOLELY IMPLEMENTED AS SCRIPT FEATURES VIA "builtins"!  IT IS NOT A
4413	BUG THAT THEY ARE "MISSING".  The way to fix this is to /load global
4414	or /load builtins in your startup script.
4415		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
4416
4417*** News 04/18/2005 -- New script, "loadformats" (fudd)
4418	This script presents the usable interface to implied on hooks.
4419	See the explanation for implied on hooks below.
4420
4421	/ADDFORMAT <type> [value]
4422	   This binds the implied on hook for /ON <type> to a new builtin set
4423	   that is called /SET FORMAT_<type>.  Remember that implied on hooks
4424	   are only used if you don't hook serial number zero!
4425
4426	/DELFORMAT <type>
4427	   This removes the implied on hook for /ON <type> and removes the
4428	   builtin set /SET FORMAT_<type>.
4429
4430	/DUMPFORMATS
4431	   This does a /DELFORMAT for all possible values of <type>.  You
4432	   will not have any implied on hooks after this is done.
4433
4434	/LOADFORMAT <filename>
4435	   Given a file that contains lines that look like this:
4436		<TYPE> <VALUE>
4437	   Run /ADDFORMAT <TYPE> <VALUE> for each line.
4438
4439	/SAVEFORMATS <filename>
4440	  Save all implied hooks to a file so it can be loaded later with
4441	  /LOADFORMAT.
4442
4443*** News 03/29/2005 -- Just a note about mangling of /on patterns...
4444	In EPIC5, your /ON patterns are no longer "filled out" to the expected
4445	number of words in $*.  An example:
4446		EPIC4:	/ON PUBLIC "hop" 	becomes
4447			/ON PUBLIC "hop % *"
4448		EPIC5:	/ON PUBLIC "hop"	stays as it is.
4449	Note that the EPIC5 version *WILL* *NOT* *EVER* *MATCH* any real
4450	/on public's because it doesn't match any valid $* values.
4451
4452	Why was this change made?  Because /on is a general purpose function,
4453	there were problems where some /on's sometimes did not always have
4454	the minimum number of words in $* that they were supposed to, and it
4455	would lead to spaces in odd places, preventing matches.
4456
4457	It was decided that we would leave "filling it out" as a task that
4458	the scripter would need to be responsible for.  In the above case,
4459	you can simple solve the problem with:
4460
4461		EPIC5:	/ON PUBLIC "hop *"
4462
4463*** News 03/20/2005 -- History recall moved into a script (Blackjac)
4464		*** IMPORTANT *** IMPORTANT *** IMPORTANT ***
4465	History recall (BACKWARD_HISTORY and FORWARD_HISTORY) are now
4466	scripted features, implemented by
4467			/load history
4468	instead of hardcoded into the client.  If you want to be able to
4469	use cursor up and down to recall input history you need to add
4470			/load history
4471	to your ~/.epicrc or ~/.ircrc file.  Remember, if you do not put
4472			/load history
4473	in your startup file, then you will find that input history recall
4474	will no longer be available.  So just put
4475			/load history
4476	in your startup file, and everything will be cool!
4477
4478EPIC5-0.0.4
4479
4480*** News 03/14/2005 -- New option to $line(), $line(<num> -TIME)
4481	You can now provide the "-TIME" option to the $line() function
4482	which returns the timestamp when that line was added to the lastlog.
4483	You can use -TIME together with -LEVEL, and if you do, the level is
4484	always the second-to-last word, and the timestamp is the last word.
4485	You can pass the timestamp to $strftime() for conversion.
4486
4487	Example:
4488		$line(<num> -LEVEL -TIME)
4489	might return
4490		"Some line goes here CRAP 1110000000"
4491
4492*** News 03/11/2005 -- Implied ON hooks ($hookctl(SET LIST <type> IMPLIED <str>)
4493	A lot of people create a large number of on hooks that look like:
4494		ON ^TYPE * { echo $cparse($format[type]) }
4495	for each TYPE.  Since all of these ONs are otherwise identical,
4496	they clutter up the /on list, and managing all of the variables
4497	is a hassle.  So there is now a feature to allow you to set an
4498	"implied" on hook that does nothing more than the above.
4499
4500	You can now set a format with
4501		$hookctl(SET LIST <type> IMPLIED <string>)
4502	and if you don't have an /ON <type> *, then epic will do
4503		echo $cparse(<string>)
4504	and suppress the normal output.
4505
4506	You may surround <string> with {}s if you wish, to avoid quoting
4507	hell.  Match sure to keep your {}s matched up if you do so.
4508	See the "loadformats" info above for how to practically use this.
4509
4510	You can compile out this feature if it offends you by #undef'ing
4511	IMPLIED_ON_HOOKS in config.h
4512
4513*** News 03/03/2005 -- New status bar expandos, %{2}+ and %{3}+
4514	These two status exapndos act like %+ and %{1}+ respectively,
4515	except that %{2}+ and %{3}+ will contain only the mode string,
4516	and not any subsequent arguments.  Specifically, %{2}+ and %{3}+
4517	don't include the channel's key or user limit (if any).
4518
4519*** News 03/03/2005 -- New configure options, --with-multiplex
4520	You can choose which multiplex function you want epic to use with
4521	a new configure option, "--with-multiplex".  These are the values:
4522			--with-multiplex=select
4523			--with-multiplex=poll
4524			--with-multiplex=freebsd-kqueue
4525			--with-multiplex=pthread
4526	If you don't choose a multiplexer, or you choose one that isn't
4527	supported by your system, it will use select instead.  Note that
4528	the kqueue() support is only tested on freebsd-4 and freebsd-5.
4529
4530	If you use --with-multiplex=pthread and --with-ssl together,
4531	and your openssl version was not compiled to be thread-safe, then
4532	you won't be able to use ssl with pthreads (it would crash if
4533	you tried).
4534
4535*** News 03/03/2005 -- New $hookctl() operation, "GET HOOK <ref> STRING"
4536	The $hookctl(GET HOOK <ref> STRING) operation returns a string that
4537	is suitable for passing to /eval {....} to recreate the hook.  This
4538	will be used by scripts that want to "/save" an /on.  If you write
4539	these values to a file, you will be able to /load it later.
4540
4541*** News 03/03/2005 -- Changes to how error messages are displayed
4542	Traditionally, ircII clients have tried to emit one error message
4543	for each error event, putting all of the information into one line.
4544	This has its advantages and disadvantages.  The main disadvantage is
4545	that if information is difficult to pass around, it is usually
4546	discarded, and the user may be given a vague or useless error message.
4547
4548	So now error reporting has been revamped in epic.  Whenever an error
4549	is actually generated (or first noticed), the information that is
4550	available will be displayed to the screen.  Then a failure condition
4551	will be sent up to the higher levels of epic, and each higher level
4552	will give you whatever information it has available.  Thus, while an
4553	error message may take up 3 or 4 lines of display, each line has a
4554	little piece of information the others don't, and taken together, you
4555	get the full picture of what happened.
4556
4557	Each error line looks like this:
4558			*** ERROR -- <message>
4559	where "***" is the value of /SET BANNER.  These errors are yells,
4560	so if you want to hide them, use /ON YELL.
4561
4562
4563*** News 02/28/2005 -- !!! IMPORTANT !!! "global" SCRIPT NO LONGER AUTO-LOADED
4564		This is a backwards incompatable change!
4565
4566	A lot of people who run script packs find that the "global" script
4567	which is automatically and unconditionally loaded by epic at startup
4568	is a nuisance which must be eliminated.  After much deliberation, it
4569	seems agreeable to most parties that *by default*, the "global" script
4570	will only be loaded for those people who do not have their own startup
4571	script (~/.ircrc or ~/.epicrc)
4572
4573	If you *have* your own startup script, and you *like* having the global
4574	script loaded at startup then you need to make a one-time change to
4575	the top of your startup script:
4576			load global
4577	which will give you old backwards-comaptable behavior.  If you do not
4578	make this change, then some /on's, /alias's, and other things that
4579	you may have had access to will disappear until you make this change.
4580
4581	For those of you who do not have your own startup script, you will not
4582	notice any changes.
4583
4584	For those of you who have wished the 'global' script to die a horrible
4585	fiery death, you have got your wish.
4586
4587*** News 02/28/2005 -- New built in command, /SUBPACKAGE
4588	The /SUBPACKAGE command is probably temporary, so don't get too
4589	attached to it yet.  This command should be used in scripts that
4590	are loaded from other scripts, who have used the /PACKAGE command,
4591	to set up a "nested" package name.  For example:
4592
4593	File "one":
4594	  /PACKAGE one
4595	  /LOAD two
4596	  /ALIAS frobnitz {echo hello!}
4597
4598	File "two"
4599	  /SUBPACKAGE two
4600	  /ALIAS oofda {echo hi!}
4601
4602	In this example, "frobnitz" will be in the package "one" and
4603	"oofda" will be in the package "one::two".
4604
4605*** News 02/28/2005 -- The invite command changed here
4606	This was never documented for some reason until June 2007.
4607
4608	You can now invite people more flexibly:
4609		INVITE #chan nick1 nick2 nick3
4610	or	INVITE nick #chan1 #chan2 #chan3
4611	or	INVITE nick
4612
4613	and it will just figure out the right thing to do.
4614
4615*** News 02/04/2005 -- Clarification on /EXEC process output.
4616	Until this time, partial lines of output from /EXEC processes
4617	were silently ignored, could not be redirected, and callbacks
4618	and /on's were not executed in the correct window.  Now the
4619	partial-line and full-line handler for /exec processes has been
4620	unified, and they both work like this:
4621
4622	1) Set up the correct server and window
4623	   Note: Yes, I am aware this may need further refactoring.
4624	2) Increment the line output
4625	   Note: Partial lines now count as a line of output for the
4626		 -LIMIT counter.
4627	3) If you used -MSG or -NOTICE or -OUT, send the the text to
4628	   the target.
4629	   Note: This usually hooks an /ON SEND_* hook (see below)
4630	4) If you used -LINE or -LINEPART or -ERROR or -ERRORPART, call
4631	   the appropriate callback
4632	-or-
4633	4a) If you didn't use them, hook the appropriate /ON.
4634	4b) If you didn't hook the /ON, and you aren't redirecting the
4635	    output to another target, output it to the screen.
4636
4637	Note that (4b) and (3) work in complement to each other.  If you do
4638		/EXEC -MSG nick w
4639	then the output will be handled through /ON SEND_MSG (either from
4640	your own on, or from the default output).  If you do not, then the
4641	output will be handled by /ON EXEC.
4642
4643*** News 02/02/2005 -- New $serverctl() attribute, "PROTOCOL"
4644	$serverctl(GET <refnum> PROTOCOL) now either returns "IRC" or
4645	"IRC-SSL" depending on whether you're doing a regular irc, or an
4646	ssl-enabled irc connection, eh!
4647
4648*** News 02/02/2005 -- Automatic creation of ALTNAME for servers, %S changes.
4649	When you create a new server (with /server or /server -add or
4650	/window server), the server will automatically be given its first
4651	"altname" (see "Alternate server names" below).
4652
4653	Each server's first altname is constructed as:
4654	* If the server name is an IP address, the whole name,
4655        * Otherwise, the first segment that does not start with "irc".
4656
4657	This is the value you have historically seen at %S on your status
4658	bar.  This value is now automatically created as your server's
4659	first altname, and you can change it!
4660
4661		@serverctl(SET <refnum> ALTNAMES <whatever>)
4662
4663	%S, and %{1}S have been changed to use the "first altname" for
4664	the server, whatever you choose that to be.
4665
4666	Please note:  If you clear your server's altname list, then %S and
4667	%{1}S will have no choice but to show the server's full name.  This
4668	is intentional and not a bug.  %{2}S will continue to show your
4669	server's full name all the time.
4670
4671*** News 01/27/2005 -- New status expando, %{3}S
4672	%{3}S is just like %{2}S, but instead it shows the server's group
4673	instead of the server's name.
4674
4675*** News 01/26/2005 -- Notes for forward compatability
4676			*** /SET -CREATE DEPRECATED ***
4677	EPIC5-0.0.3 includes /SET -CREATE, but this is deprecated, and will
4678	be removed by EPIC5-0.0.5.  It is suggested that you start using
4679	$symbolctl() [see below] in scripts that support EPIC5-0.0.3 and up.
4680
4681			*** THINGS ARE GOING TO BE CHANGING ***
4682	Starting before EPIC5-0.0.5, there will be a signficant shift to try
4683	to script as many /set's and builtin commands as possible.  This
4684	stuff is all intended to be put into the 'builtins' script which is
4685	loaded from 'global' (ie, it's automatically loaded).  Some of you do
4686	not load 'global' and so by EPIC5-0.0.5, if you do not load builtins,
4687	you will find a lot of features gone.  I won't consider this a "bug",
4688	but the natural progression of EPIC5's development...
4689
4690	Builtin commands that will be moved to 'builtins'
4691		/BYE		/DATE		/EXIT
4692		/HOST		/IRCHOST	/IRCNAME
4693		/LEAVE		/REALNAME
4694		/SIGNOFF
4695
4696	Builtin functions that will be moved to 'builtins'
4697		$serverhost()
4698
4699	Builtin SETs that will be moved to 'builtins'
4700		AUTO_REJOIN	AUTO_REJOIN_DELAY	AUTO_UNMARK_AWAY
4701		AUTO_WHOWAS	NUM_OF_WHOWAS		BEEP_ON_MSG
4702		COMMAND_MODE	FULL_STATUS_LINE	REVERSE_STATUS_LINE
4703		SHOW_CHANNEL_NAMES		SHOW_END_OF_MSGS
4704		SHOW_WHO_HOPCOUNT		VERBOSE_CTCP
4705
4706EPIC5-0.0.3
4707
4708*** News 01/25/2005 -- New built in function, $symbolctl()
4709	Here's the plan.  An all-encompasing low-level symbol manipulation
4710	thingee.  This interface is not intended to replace $aliasctl(), but
4711	rather to supplement it.  No, $aliasctl() will never be removed.
4712	Yes, much of its functionality (but not all) is duplicated here.
4713
4714	$symbolctl(TYPES)
4715	     Return all of the types supported in this version of EPIC:
4716	     ALIAS		ASSIGN			BUILTIN_COMMAND
4717	     BUILTIN_FUNCTION	BUILTIN_EXPANDO		BUILTIN_VARIABLE
4718
4719	$symbolctl(PMATCH <type> <pattern>)
4720	     Return all symbols of type <type> that match <pattern>.  You can
4721	     use the special value "*" for <type> to get symbols of all types.
4722
4723	$symbolctl(CREATE <symbol>)
4724	     Ensure that <symbol> exists in the global symbol table.  When
4725	     symbols are first created, they do not contain any actual values,
4726	     but rather act as a placeholder in case you want to set any.
4727	     You must ensure that a symbol exists before you try to change
4728	     its values.  CREATEing a symbol that already exists is harmless;
4729	     feel free to do it.
4730
4731	$symbolctl(DELETE <symbol>)
4732	$symbolctl(DELETE <symbol> <type>)
4733	     Delete all of the values of a particular symbol, or just one type.
4734	     Example: $symbolctl(DELETE booya ALIAS) is the same as
4735				/alias -booya
4736	     Warning: You can delete built in variables/functions/etc with this!
4737		      There's no way to restore them back if you do!  Caution!
4738
4739	$symbolctl(CHECK <symbol>)
4740	     Inspects <symbol> to see if it has any values left.  If there are
4741	     no values left for <symbol>, it is removed from the global symbol
4742	     table.  You must then CREATE it again if you want to use it later.
4743
4744			*** IMPORTANT NOTE ABOUT "LEVELS" ****
4745	In order to "get" or "set" a symbol's values, the symbol needs to exist.
4746	If you try to "get" or "set" a symbol that doesn't exist, $symbolctl()
4747	will return the empty string to tell you that it failed.  You need to
4748	use the CREATE operation above to bootstrap a new symbol before using
4749	it.
4750
4751	Now, /STACK PUSH and /STACK POP work by manipulating "levels" in the
4752	symbol table.  By rule, <level> == 1 always refers to the "current"
4753	value of a symbol.  If you do /STACK PUSH, then the value you pushed
4754	will be copied to <level> == 2.  If you /STACK PUSH something else,
4755	that values moves to <level> == 3.  So what you can do is use
4756	"GET x LEVELS" to find out how many levels a symbol has, and then use
4757	"GET x <num>" to find out if there is a symbol type that interest you
4758	at that level.  IN THIS WAY you can directly manipulate the /stack push
4759	values without having to actually use the /stack command.
4760
4761	In general, <level> is always 1 for everything you want to do, unless
4762	you are intentionally monkeying around with your /stack values.
4763
4764		 *** NOW BACK TO YOUR REGULARLY SCHEDULED HELP ***
4765	$symbolctl(GET <symbol> LEVELS)
4766	     Return the number of levels of <symbol> that are /STACKed.  This
4767	     value is always 1 unless you have /STACK PUSHed something.
4768	$symbolctl(GET <symbol> <level>)
4769	     Return all of the <type>s that are defined for <symbol> at <level>.
4770	     If <level> is 1, it gets the current value(s).  If <level> is > 1,
4771	     it starts looking at the /STACK PUSHed values.
4772
4773	$symbolctl(GET <symbol> <level> ALIAS VALUE)
4774	$symbolctl(GET <symbol> <level> ALIAS STUB)
4775	$symbolctl(GET <symbol> <level> ALIAS PACKAGE)
4776	$symbolctl(GET <symbol> <level> ALIAS ARGLIST)
4777	     Retrieve one of the values for one of your aliases
4778
4779	$symbolctl(GET <symbol> <level> ASSIGN VALUE)
4780	$symbolctl(GET <symbol> <level> ASSIGN STUB)
4781	$symbolctl(GET <symbol> <level> ASSIGN PACKAGE)
4782	     Retrieve one of the values for one of your assigns
4783
4784	$symbolctl(GET <symbol> <level> BUILTIN_COMMAND)
4785	$symbolctl(GET <symbol> <level> BUILTIN_FUNCTION)
4786	$symbolctl(GET <symbol> <level> BUILTIN_EXPANDO)
4787	     Returns 0 if these types are not in use (ie, if there is not a
4788	     built in command), and returns non-zero if there is.  If you're
4789	     smart, you won't try to do anything with the non-zero value.
4790
4791	$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE TYPE)
4792	$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE DATA)
4793	$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE BUILTIN)
4794	$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE SCRIPT)
4795	$symbolctl(GET <symbol> <level> BUILTIN_VARIABLE FLAGS)
4796	     Retrieve information about a /SET.
4797	     The "TYPE" is one of "STR", "INT", "BOOL", or "CHAR"
4798	     Generally, either "BUILTIN" or "SCRIPT" is set, but not both.
4799
4800	$symbolctl(SET <symbol> <level> ALIAS VALUE <string>)
4801	$symbolctl(SET <symbol> <level> ALIAS STUB <string>)
4802	$symbolctl(SET <symbol> <level> ALIAS PACKAGE <string>)
4803	$symbolctl(SET <symbol> <level> ALIAS ARGLIST <string>)
4804	     Change one of the values for one of your aliases.  If you omit
4805	     the <string>, it will clear the value.
4806
4807	$symbolctl(SET <symbol> <level> ASSIGN VALUE <string>)
4808	$symbolctl(SET <symbol> <level> ASSIGN STUB <string>)
4809	$symbolctl(SET <symbol> <level> ASSIGN PACKAGE <string>)
4810	     Change one of the values for one of your assigns.  If you omit
4811	     the <string>, it will clear the value.
4812
4813	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE)
4814	     Create a new user-created /SET with default values (type == BOOL,
4815	     data == OFF, script is <empty>.)
4816	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE TYPE <set-type>)
4817	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE DATA <string>)
4818	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE BUILTIN)
4819	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE SCRIPT <code>)
4820	$symbolctl(SET <symbol> <level> BUILTIN_VARIABLE FLAGS)
4821	     Change one of the values for one of your /set's.  You cannot
4822	     change values for system /set's, sorry.  Setting the TYPE value
4823	     changes the DATA value to a default (<empty> for strings, 0 for
4824	     everything else) so always set DATA after setting TYPE.
4825	     Yes, you can change the TYPE of a /set after you create it!
4826	     It's probably a bad idea to set FLAGS for the present.
4827
4828*** News 01/13/2005 -- New $logctl() feature, $logctl(CURRENT)
4829	$logctl(CURRENT) can return one of these values:
4830
4831		-1	Nothing is being logged right now
4832		 0	Something is being logged to the global log, or to
4833			a window log
4834		>0	Something is being logged to the given log refnum.
4835			You can use this log refnum with $logctl().
4836
4837*** News 01/11/2005 -- New /ON, /ON NEW_NICKNAME
4838	This allows you to create your own nickname mangler whenever EPIC
4839	is resetting your nickname to register to a server.  Remember that
4840	your nickname is (usually) not reset if /SET AUTO_NEW_NICK is ON, so
4841	you need to /SET that to OFF before this can be used.
4842
4843	Each time that your nickname is "reset" (see next entry), the
4844	/ON NEW_NICKNAME hook will be thrown.
4845		$0 - Server whose nickname is being reset
4846		$1 - Your current nickname ("*" if you're unregistered)
4847		$2 - The nickname you tried to change to ("*" if none)
4848	You should somehow use this information to generate a new nickname
4849	and then do a /NICK <newnick> operation.  You should avoid trying
4850	to do anything else, particularly asynchronous things like /wait,
4851	because the status of the connection is unknown when this /ON is
4852	thrown (ie, you may not be connected).  Just stick to /NICK.
4853
4854	If you do not hook the /ON, or you do not do a /NICK within the
4855	/ON, then epic will prompt you for a new nickname in the way it
4856	has always done (so this change is opt-in and backwards compatable).
4857
4858*** News 01/11/2005 -- Changes to how nick change errors are handled
4859	Until this point, EPIC sometimes (rather aggressively) forced the
4860	user to provide a new nickname, when it wasn't necessary.  This
4861	was called "resetting" the nickname.  The variable /SET AUTO_NEW_NICK
4862	existed to try to avoid needlessly annoying the user with requests
4863	for nicknames when a new one could be whipped up.
4864
4865	Well, anyways, this has all been refactored.  If you are already
4866	connected to the server, epic will no longer "reset" your nickname
4867	when it recieves one of the many numerics that indicate that your
4868	nickname is not acceptable.  "Resets" will only occur when you are
4869	unregistered (when you do not have a nickname yet).
4870
4871	As with before, if you have /SET AUTO_NEW_NICK ON, then your nickname
4872	will never be "reset" unless the nickname mangler is unable to come
4873	up with an alternate nickname for you.
4874
4875*** News 01/11/2005 -- Change to how /set new_server_lastlog_level works
4876	In EPIC4, when you do /window server, the window that is changing
4877	server has its window level changed to /SET NEW_SERVER_LASTLOG_LEVEL.
4878	This can result in two windows with level ALL if the new server can't
4879	be connected to.  Starting with now, this change will not occur until
4880	after we have registered with the server (when we get the 001 numeric).
4881
4882	This means if you do /window new server foo.com, that the new window
4883	will be level NONE until the connection to "foo.com" is successful.
4884	Furthermore, only the "current window" for "foo.com" will be changed.
4885	If you move multiple windows to a new server at the same time, only
4886	one of them is the "current window" and only that window ever has
4887	its window levels changed.  The others stay at "NONE".
4888
4889*** News 01/06/2005 -- Can now set ipv4/ipv6 vhosts separately
4890	The /hostname (/irchost) and -H command line option may now take
4891	two hostnames, separated by a slash.  Example:
4892
4893	/hostname foo.bar.com		Use "foo.bar.com" as the vhost for
4894					both ipv4 and ipv6
4895	/hostname foo.bar.com/faz.bar.com
4896					Use "foo.bar.com" as the vhost for
4897					ipv4, and "faz.bar.com" as the vhost
4898					for ipv6.
4899	/hostname foo.bar.com/		Use "foo.bar.com" as the vhost for
4900					ipv4 only -- don't change the ipv6
4901					vhost
4902	/hostname /foo.bar.com		Use "foo.bar.com" as the vhost for
4903					ipv6 only -- don't change the ipv4
4904					vhost
4905
4906*** News 01/06/2005 -- New serverctl attr: $serverctl(GET <num> ADDRFAMILY)
4907	The $serverctl(GET <num> ADDRFAMILY) value returns either
4908		ipv4		if the server connection is ipv4
4909		ipv6		if the server connection is ipv6
4910		unix		if the server connection is a filename
4911
4912*** News 01/06/2005 -- Old (undocumented) function: $servports()
4913	There has been a function $servports() around for a very long time,
4914	but it's never been documented.  It returns two values, the first
4915	one is the remote port (what you connected to the server with), and
4916	the second one is the local port (which is not always useful).
4917
4918*** News 01/01/2005 -- Argument lists for hooks, and $fix_arglist() (howl)
4919	$fix_arglist(arglist) returns how argument list arglist will be parsed
4920	by epic.
4921
4922	It is now possible to supply argument lists to hooks, just like
4923	one would do for aliases:
4924	/on hook "*" (a,b,...) {echo $a $b $*;};
4925
4926	They are optional, of course.
4927
4928	/ON lists the argument list as part of its output, and does also include
4929	the hook's userial (unique serial)
4930
4931*** News 01/01/2005 -- New function: $hookctl() (howl)
4932    This function presents a low-level interface to the /on system
4933
4934    === ADDING AND REMOVING HOOKS ===
4935    $hookctl(ADD [#][!][']<noise><TYPE> [<serial>] <pattern>
4936							[(<arg list>)] <code>)
4937	Compare this to:
4938	   /ON [#]<noise><TYPE> [<serial>] [!]<pattern> [(<arglist>)] <code>
4939
4940	Where [#] is used to indicate a <serial> number should be used,
4941	where [!] is used to indicate that the ON is a "negative" ON
4942	where ['] is used to indicate that the ON is a "flexible" ON
4943	where [<noise>] is one of "?", "^", "-", "+", "%", or nothing.
4944	where [<TYPE>] is one of the ON types (ACTION, MSG, PUBLIC, etc)
4945	where [<serial>] is the ON's serial number (NOT the refnum!)
4946	where [<pattern>] is the ON's wildcard pattern (the "nick") that is
4947		matched against $* each time the ON is checked
4948	where [<code>] is the ircII code that is executed each time the ON
4949		is run.
4950
4951	ADD registers a new /ON and returns the /ON's new <refnum>.  This
4952	<refnum> can be used in other $hookctl() operations.
4953
4954	Example: $hookctl(ADD ^MSG * (nick, msg) {echo msg from $nick: $msg})
4955	   is the same as
4956		/ON ^MSG * (nick, msg) {echo msg from $nick: $msg}
4957	   except it returns the new /on's <refnum> (of course).
4958
4959    $hookctl(REMOVE <refnum>)
4960	Delete the given /ON.  If <refnum> is -1, it removes the currently
4961	executing /ON.
4962
4963    === WORKING WITH THE ONs YOU'VE CREATED ===
4964    -- In these GET HOOK operations, the values in <> are the values that
4965       were originally provided to the ADD operation (or the /ON command)
4966       <Refnum> is always allowed to be -1, and refers to the currently
4967       executing /ON.
4968
4969    $hookctl(GET HOOK <refnum> ARGUMENT_LIST)
4970	Return an /ON's <arglist> if it has one.
4971
4972    $hookctl(GET HOOK <refnum> FLEXIBLE)
4973	Return 1 if /ON was created with ['] (flexible -- <pattern> is
4974		expanded each time the /ON is checked)
4975	Return 0 if not.
4976
4977    $hookctl(GET HOOK <refnum> NICK)
4978	Return an /ON's <pattern>.
4979
4980    $hookctl(GET HOOK <refnum> NOT)
4981	Return 1 if /ON was created with [!] (negative on)
4982	Return 0 if not.
4983
4984    $hookctl(GET HOOK <refnum> NOISE)
4985    $hookctl(GET HOOK <refnum> NOISY)
4986	Return an /ON's <noise>.
4987
4988    $hookctl(GET HOOK <refnum> PACKAGE)
4989	Return an /ON's </package> value.
4990
4991    $hookctl(GET HOOK <refnum> SERIAL)
4992	Return an /ON's <serial>.  If one wasn't given, 0 is the default.
4993
4994    $hookctl(GET HOOK <refnum> SKIP)
4995	Return 1 if the /ON is being "skipped"
4996		("skipped" == ignored -- treated as if it had been deleted)
4997
4998    $hookctl(GET HOOK <refnum> STUFF)
4999	Return an /ON's <stuff>
5000		("stuff" == the ircII code when the /ON goes off)
5001
5002    $hookctl(GET HOOK <refnum> TYPE)
5003	Return an /ON's <TYPE>
5004
5005    -- In these SET HOOK operations, if you attempt to change a value so it
5006       clobbers (duplicates) an existing ON's value, then the operation will
5007       either fail, or it will replace the existing ON.  I'll have to ask
5008       howl how he handled this.
5009
5010    $hookctl(SET HOOK <refnum> ARGUMENT_LIST)
5011	Clear an /ON's argument list (so it no longer takes one)
5012
5013    $hookctl(SET HOOK <refnum> ARGUMENT_LIST <list>)
5014	Replace an /ON's argument list
5015
5016    $hookctl(SET HOOK <refnum> FLEXIBLE [0|1])
5017	Clear (or set) an /ON's flexible-pattern attribute
5018
5019    $hookctl(SET HOOK <refnum> NICK <pattern>)
5020	Change an /ON's <pattern>.  Warning -- You can only have one /ON
5021	per serial number with the exact same <pattern>.
5022
5023    $hookctl(SET HOOK <refnum> NOT [0|1])
5024	Clear (or set) an /ON's "negative on" attribute
5025
5026    $hookctl(SET HOOK <refnum> NOISE <noiseref|noise>)
5027    $hookctl(SET HOOK <refnum> NOISY <noiseref|noise>)
5028	Change an /ON's <noise> value using either a noise-refnum or
5029	the noise's name itsself
5030	Example: $hookctl(SET HOOK 147 NOISE SILENT)
5031	     and $hookctl(SET HOOK 147 NOISE 1) do the same thing.
5032
5033    $hookctl(SET HOOK <refnum> PACKAGE <string>)
5034	Change an /ON's </package> value.  This is used by /unload.
5035
5036    $hookctl(SET HOOK <refnum> SERIAL <number>)
5037	Change an /ON's <serial> value.  Warning -- You can only have one
5038	/ON per serial number with the exact same <pattern>.
5039
5040    $hookctl(SET HOOK <refnum> SKIP [0|1])
5041	Clear (or set) an /ON's skippable attribute.  When an /ON is being
5042	"skipped", it cannot ever be executed; it is treated as if it were
5043	deleted.
5044
5045    $hookctl(SET HOOK <refnum> STUFF <ircII code>)
5046	Change the ircII commands executed when an /ON goes off.
5047
5048
5049    === GETTING INFORMATION ABOUT ON TYPES ===
5050    $hookctl(LIST)
5051    $hookctl(LIST LISTS)
5052	Return all of the valid <TYPE>s
5053
5054    $hookctl(LIST LISTS <pattern>)
5055	Return all of the valie <TYPE>s that match the <pattern>
5056	Ex: $hookctl(LIST LISTS g*) returns "GENERAL_NOTICE GENERAL_PRIVMSG"
5057
5058    $hookctl(LIST POPULATED_LISTS)
5059	Return all of the valid <TYPE>s that have an /ON registered for them.
5060
5061    $hookctl(LIST POPULATED_LISTS <pattern>)
5062	Return all of the valid <TYPE>s that match the <pattern> that have an
5063	/ON registered for them.
5064
5065    $hookctl(LIST HOOKS)
5066	Return all of the registered <refnum>s
5067
5068    $hookctl(LIST HOOKS <pattern>)
5069	Return all registered <refnum>s for <TYPE>s that match <pattern>.
5070	Ex: $hookctl(LIST HOOKS MSG) returns the refnums of your /ON MSG's
5071
5072    $hookctl(FIRST_NAMED_HOOK)
5073	Return the number such that
5074		$word($hookctl(FIRST_NAMED_HOOK) $hookctl(LIST))
5075	returns the first non-numeric /ON type.
5076
5077    $hookctl(NUMBER_OF_LISTS)
5078    $hookctl(COUNT)
5079    $hookctl(COUNT LISTS)
5080	Return the number of items in $hookctl(LIST)
5081
5082    $hookctl(COUNT LISTS <pattern>)
5083	Return the number of items in $hookctl(LIST LISTS <pattern>)
5084
5085    $hookctl(COUNT POPULATED_LISTS)
5086	Return the number of items in $hookctl(LIST POPULATED_LISTS)
5087
5088    $hookctl(COUNT POPULATED_LISTS <pattern>)
5089	Return the number of items in $hookctl(LIST POPULATED_LISTS <pattern>)
5090
5091    $hookctl(COUNT HOOKS)
5092	Return the number of items in $hookctl(LIST HOOKS)
5093
5094    $hookctl(COUNT HOOKS <pattern>)
5095	Return the number of items in $hookctl(LIST HOOKS <pattern>)
5096
5097    $hookctl(GET LIST <TYPE> NAME)
5098	This just returns <TYPE>, since the name of any <TYPE> is itsself.
5099
5100    $hookctl(GET LIST <TYPE> PARAMS)
5101	Return the mininum number of words in $* for any /ON of this type.
5102	Remember that your <pattern> is expected to match a $* that has
5103	AT LEAST this number of words.  If your <pattern> doesn't, the /ON
5104	will never go off.
5105
5106    $hookctl(GET LIST <TYPE> MARK)
5107	Return the number of invocations of this /ON type are pending.
5108	For example, the first time an /ON MSG event is thrown, then
5109	$hookctl(GET LIST MSG MARK) is 1.  If your /ON does something
5110	funky like a /WAIT and another MSG comes in before your /ON is
5111	finished, then $hookctl(GET LIST MSG MARK) is 2.
5112
5113    $hookctl(GET LIST <TYPE> FLAGS)
5114	This is an internal bitmask value.  The only defined bit is 1, which
5115	is used to prevent an /ON from going off recursively.  One such ON
5116	is /ON INPUT.  If $hookctl(GET LIST INPUT MARK) is 1, then another
5117	/ON INPUT event is thrown, no /ON's will actually be executed; the
5118	ON is considered unhooked.  This allows you do perform certain
5119	commands (like /sendline) from within certain /ON's (like /on input)
5120	where without this flag that would result in infinite recursion
5121	(and crash)
5122
5123    === GETTING INFORMATION ABOUT NOISE TYPES ===
5124    $hookctl(DEFAULT_NOISE_LEVEL)
5125	This always returns "NORMAL" for now.  This is the <noisetype> whose
5126	VALUE (see below) is the null character.
5127
5128    $hookctl(NOISE_LEVELS)
5129	This returns all of the <noisetype> values.
5130	Ex: $hookctl(NOISE_LEVELS) returns "SILENT QUIET NORMAL NOISY SYSTEM"
5131
5132    $hookctl(NOISE_LEVELS <pattern>)
5133	This returns all of the <noisetype> values that match <pattern>
5134	Ex: $hookctl(NOISE LEVELS s*) returns "SILENT SYSTEM"
5135
5136    $hookctl(NOISE_LEVEL_NUM)
5137	This returns the highest <noiseref> value.
5138
5139    In the GET NOISE operations, <noisetype> is the name of a noise
5140    flag.  This is one of "SILENT", "QUIET", "NORMAL", "NOISY", and
5141    "SYSTEM".  <noiseref> is a refnum that uniquely identifies each
5142    of the noise types.  The above are numbered 1, 2, 3, 4, and 5
5143    respectively.
5144
5145    $hookctl(GET NOISE <noisetype|noiseref> NAME)
5146	Get the name of the noise type.  One of "SILENT", "QUIET",
5147	"NORMAL", "NOISY", or "SYSTEM"
5148
5149    $hookctl(GET NOISE <noisetype|noiseref> DISPLAY)
5150	Returns 0 if the noise type does a /SET DISPLAY OFF while
5151		executing the /ON body.
5152	Returns 1 if /SET DISPLAY is not changed when the /ON goes off.
5153
5154    $hookctl(GET NOISE <noisetype|noiseref> ALERT)
5155	Returns 0 if you are not told when the /ON is executed.
5156	Returns 1 if you are told whenever the /ON is executed.
5157
5158    $hookctl(GET NOISE <noisetype|noiseref> SUPPRESS)
5159	Preface:  With most /ON's, if you do not have any /ON's that
5160		are appropriate to run, then some "default" action will
5161		be taken.
5162	Returns 0 if executing the /ON does not cause the "default" action
5163		to be suppressed.
5164	Returns 1 if executing the /ON causes the "default" action to be
5165		suppressed.
5166
5167    $hookctl(GET NOISE <noisetype|noiseref> VALUE) 	(refnum)
5168	Returns the refnum of the noise type.
5169	Example: $hookctl(GET NOISE SILENT VALUE) returns "1".
5170
5171    $hookctl(GET NOISE <noisetype|noiseref> IDENTIFIER)
5172	Returns the <noise> value to use when you want to use this noise type.
5173	Example: $hookctl(GET NOISE SILENT IDENTIFIER) returns "^".
5174
5175    $hookctl(GET NOISE <noisetype|noiseref> CUSTOM)
5176	This always returns 0 for now.
5177
5178    === MISCELLANEOUS OPERATIONS ===
5179    $hookctl(EXECUTING_HOOKS)
5180	This returns the refnums of all of the hooks that are currently
5181	pending (executing).  Since /ONs work like a LIFO queue, the first
5182	word is the current /ON, and the second word is the /ON that is waiting
5183	for the first one to finish, etc.   Obviously you can use this to
5184	operate on an /ON from within itsself whenever it goes off.
5185
5186    $hookctl(HALTCHAIN <refnum>)
5187    $hookctl(DENY_ALL_HOOKS)
5188    $hookctl(DENY_ALL_HOOKS 1)
5189    $hookctl(DENY_ALL_HOOKS 0)
5190    $hookctl(EMPTY_SLOTS)
5191    $hookctl(HOOKLIST_SIZE)
5192    $hookctl(LAST_CREATED_HOOK)
5193    $hookctl(PACKAGE <package> [<type>])
5194    $hookctl(SERIAL <sernum> [<type>])
5195    $hookctl(RETVAL)
5196    $hookctl(RETVAL <value>)
5197    $hookctl(LOOKUP <type> <pattern> <serial>)
5198    $hookctl(MATCH <type> <pattern>)
5199
5200*** News 01/01/2005 -- New function: $hookctl() (howl)
5201    This new function, $hookctl(), lets the users do pretty much whatever
5202	they
5203
5204	$hookctl() arguments:
5205   ADD <#!'[NOISETYPE]><list> [[#]<serial>] <nick> [(<argument list>)] <stuff>
5206       Argument list not yet implemented for $hookctl()
5207   ADD <#!'[NOISETYPE]><list> [[#]<serial>] <nick> <stuff>
5208       - Creates a new hook. Returns hook id.
5209   COUNT
5210       - See COUNT/LIST
5211   HALTCHAIN <recursive number>
5212       - Will set the haltflag for eventchain. May halt the current chain,
5213         or any chain currently being executed.
5214         Returns 1 on success, 0 otherwise.
5215   DEFAULT_NOISE_LEVEL
5216       - returns the 'default noise level'. It is not currently possible
5217         to change the current noise level, and probably never will be.
5218   DENY_ALL_HOOKS <arguments>
5219       - this sets the deny_all_hooks flag, or gets it's value. If set,
5220         to anything non negative, all hooks will be "ignored", and the
5221         default action of any event will be taken. Similar to a /DUMP ON
5222         but doens't actually remove any hooks.
5223   EMPTY_SLOTS
5224       - will return a list of empty slots in the hook-list.
5225   EXECUTING_HOOKS
5226       - will return a list of the current executing hooks. This is a
5227         'recursive' list, listing the current hook first.
5228   FIRST_NAMED_HOOK
5229       - returns FIRST_NAMED_HOOK
5230   HOOKLIST_SIZE
5231       - will returns HOOKLIST_SIZE
5232   LAST_CREATED_HOOK
5233       - returns the value of LAST_CREATED_HOOK
5234   LIST
5235       - See COUNT/LIST
5236   NOISE_LEVELS <pattern>
5237       - Returns a list of 'noise-types'. If <pattern> is specified only
5238         noise levels matching pattern will be returns.
5239   NOISE_LEVEL_NUM
5240       - Returns NOISE_LEVEL_NUM
5241   NUMBER_OF_LISTS
5242       - Returns NUBER_OF_LISTS
5243   PACKAGE <package> [<list>]
5244       - Returns a list of hooks of the given package. If <list> is
5245         specified, it will return only hooks in list <list>
5246   RETVAL <recursive number> [<new value>]
5247       - If recursve number isn't specified, 0 (the current) is specified.
5248         Will either return the value of retval for the given hook, or
5249         set it.
5250   SERIAL <serial> [<list>]
5251       - Works exactly like PACKAGE.
5252
5253   GET <type> <arg>
5254       - See GET/SET
5255   LOOKUP <list> <nick> [<serial>]
5256       - Returns hook matching given parametres.
5257   MATCH <list> <pattern>
5258       - Returns a list of matching hooks.
5259   REMOVE <hook id>
5260       - Removes the hook with the given hook ID. Returns 1 on success,
5261         0 otherwise.
5262   SET <type> <arg>
5263       - See GET/SET
5264
5265   * GET/SET usage
5266   GET gettype <arguments>
5267       - will return 'gettype'
5268   SET gettype <arguments>
5269       - will set 'gettype' or similar, and return 1 on success. Not all
5270         'gettypes' may be set, and not all gettypes will silently ignore
5271         being set.
5272
5273   It is very important to remember that GET won't ever SET anything(!!!)
5274   Won't, and shouldn't.
5275
5276   * GET/SET types:
5277   HOOK <argument>
5278       - More info on this under GET/SET HOOK
5279   LIST <arguments>
5280       - More info on this under GET/SET LIST
5281   NOISE <argument>
5282   NOISY <argument>
5283       - More info on this under GET/SET NOISE/NOISY
5284   MATCHES <argument>
5285       - More info on this under GET/SET MATCHES
5286
5287   * GET/SET HOOK usage:
5288       GET HOOK <hook id> <prop> <arg>
5289       SET HOOK <hook id> <prop> <arg>
5290
5291       <prop> may be one of the following:
5292       ARGUMENT_LIST
5293           - Returns or sets the argument list, if SET and <arg> is empty,
5294             it will be set to NULL, and therefore not used.
5295       FLEXIBLE
5296           - Returns or sets the value of flexible
5297       NICK
5298           - Sets or gets the hook's nick. The position of the hook will
5299             be changed if needed, and it is not possible to change this
5300             to a "crashing nick"
5301       NOT
5302           - Sets or gets the value of NOT.
5303       NOISE
5304       NOISY
5305           - Sets or returns the value of noisy.
5306       PACKAGE
5307           - Returns or sets the hook's packagename
5308       SERIAL
5309           - Returns or sets the serial for the hook. The hook's position
5310             in the list will be changed if necesarry, and it is not
5311             possible to set the serial to a crashing serial.
5312       SKIP
5313           - Returns or sets the value of skip.
5314       STUFF
5315           - Returns or sets the value of stuff.
5316       TYPE
5317           - Returns or sets the type.
5318
5319   * GET/SET LIST usage:
5320       GET LIST <listname> <prop>
5321       SET LIST <listname> <prop> - not functional
5322
5323       <prop> may be one of the following:
5324       COUNT
5325           - Returns count of hooks
5326       FLAGS
5327           - Returns flags
5328       MARK
5329           - Returns mark
5330       NAME
5331           - Returns name
5332       PARAMETERS
5333       PARAMS
5334           - Returns value of params
5335
5336
5337
5338   * GET/SET NOISE/NOISY usage:
5339       GET NOISE <noisename> <prop>
5340       SET NOISE <noisename> <prop> - not functional
5341
5342       <prop> may be one of the following:
5343           ALERT
5344               - returns value of alert.
5345           CUSTOM
5346               - returns value of custom.
5347           DISPLAY
5348               - returns value of display.
5349           IDENTIFIER
5350               - returns value of identifier.
5351           NAME
5352               - returns name.
5353           SUPPRESS
5354               - returns value of suppress.
5355           VALUE
5356               - returns value of value. d'oh!
5357
5358   * GET/SET MATCHES:
5359       - This function is not ready yet, and will currently RETURN_NULL.
5360
5361   * COUNT/LIST usage:
5362      COUNT / LIST work doing the same, the only difference is that
5363      COUNT will return the count of lists/hooks, while list will return
5364      a list
5365
5366      The following options are permitted:
5367
5368          LISTS <pattern>
5369          - Will either return all lists available, or only the
5370            matching ones.
5371          POPULATED_LISTS <pattern>
5372          - Works _just_ like LISTS, but will only return "populated"
5373            lists
5374          HOOKS <pattern>
5375          - Will either return all the hooks on the system, or all
5376            the hooks in the matching lists
5377
5378
5379
5380*** News 10/29/2004 -- New /ison features.
5381	To go with the -d and -f switches, the following switches have been
5382	added to exploit the new queueing mechanism:
5383
5384		-n                  # Prioritise this request.
5385		-s                  # Send the next ison request now.
5386		-len number         # Change the number of nicks per request.
5387		-oncmd {commands}   # Run these commands for online users.
5388		-offcmd {commands}  # Run these commands for offline users.
5389
5390	The descriptions of these switches are simplistic and a little
5391	inaccurate.  Some clarifications follow.
5392
5393	-len will change the maximum length of an ISON request from 500 to the
5394	given number.  This number will be used for _all_ requests from then on
5395	including those from the notify system.  In practice it may be
5396	necessary in some cases to tune this value downwards to avoid the
5397	server dropping some names off the list when they are all online.
5398
5399	-oncmd and -offcmd will run the given lines of code with $* set to all
5400	the users that a reply indicates are online or offline, respectively.
5401	Note that a single /ison request can generate multiple replies.  Also
5402	note, that there is no guarantee that the code will or will not run if
5403	$* is empty.
5404
5405	-n will place the current requests at the head of the queue.  This is
5406	useful when many requests are waiting to be sent and it is necessary to
5407	have this one replied to quickly.  Note that if the request isn't
5408	actually sent by the time the next -n is used, the newer request will
5409	always get the higher priority.
5410
5411	-s will "kick" the ison system back into action in cases where
5412	something has gone wrong and it has become necessary to use the -f flag
5413	for eg.  This is more of a debugging tool.  It will not actually cause
5414	more than $serverctl(get $servernum() maxison) requests to be sent.
5415
5416*** News 10/01/2004 -- New status format, %{3}W
5417	This is a compromise between %W and %{2}W.  %W only shows in the
5418	input window when there are split windows, and %{2}W shows in all
5419	split windows.  So %{3}W shows in the input window, even if it is
5420	the only visible window (ie, there are no split windows).
5421
5422*** News 10/01/2004 -- New window option, "toplines"
5423	You may now reserve 0 to 9 lines at the top of every windows to be
5424	removed from the scrollable portion of the window, creating a place
5425	for you to put things like a channel topic, or channel users, or
5426	whatever.
5427
5428	/WINDOW TOPLINES <N>
5429		Reserves and displays <N> lines at the top of the window,
5430		which will not be part of the window's scrollable display.
5431		By default, toplines are blank until you set them with...
5432	/WINDOW TOPLINE <N> "<string>"
5433		Sets the window's <N>th topline to <string>.  <N> must be
5434		1 to 9.  You should put <string> in double quotes.  You can
5435		change toplines even if they aren't visible.
5436
5437	$windowctl(GET <refnum> TOPLINES)
5438		Returns the number of toplines reserved at the top of the
5439		window.
5440	$windowctl(GET <refnum> TOPLINE <n>)
5441		Returns the <n>th topline for the window.
5442
5443*** News 09/14/2004 -- Added Howls shebang script support.
5444	It is now possible to write epic scripts that run from the shell
5445	command line.  Yaaay..!  The nature of the epic binary itself made this
5446	a little difficult at the interface level, so a little hackery was
5447	required.  The form of the shebang line is this:
5448
5449		#!/path/to/epic -S [command line options] -l
5450
5451	Note that the -l switch must be the last on the line, and -S must be
5452	the first.  Also note that at this point in time, -S will only work as
5453	the first part of the first argument.  The results of the use of this
5454	switch anywhere else is currently undefined.
5455
5456*** News 09/14/2004 -- Added some features to the commandqueues script.
5457	The first argument to /1cmd may now have a second number attached, with
5458	a coma.  This number if given, will cause any recurrences of the same
5459	command within that number of seconds to reset the last-executed time
5460	_without_ executing the command.
5461
5462	Use of the 0 or 1 argument form of /qcmd will now cause the timer to be
5463	reset to 5 seconds, and if called as a function, the command will be
5464	returned without executing it.
5465
5466*** News 08/25/2004 -- New target syntax, -<serverdesc>/<target>
5467	You can now send messages to the special message type:
5468		-<serverdesc>/<target>
5469	where <serverdesc> is a server description (see below) and <target>
5470	is obviously a nick or channel on that server.  This allows you to
5471	send a message to a nickname on a server other than your current
5472	window's server.  For example:
5473		@serverctl(SET 0 ALTNAME booya)		(set an altname)
5474		/msg -booya/nick hi there!
5475	Will send the message to "nick" on server 0.
5476
5477*** News 08/25/2004 -- "Server descriptions"
5478	Anywhere EPIC expects you to give it a server, it now expects a
5479	"server description" which is one of the following (in this order)
5480
5481		1) A number, which is taken as a server refnum
5482
5483		2) An "ourname" of an open server
5484		3) An "itsname" of an open server
5485		4) A "group" of an open server
5486		5) An "alternate name" of an open server
5487
5488		6) An "ourname" of a closed server
5489		7) An "itsname" of a closed server
5490		8) A "group" of a closed server
5491		9) An "alternate name" of a closed server
5492
5493	The server description may be a wildcard!  The first server
5494	(starting with server 0) that matches is used.
5495
5496	This means you can do something like this:
5497		@serverctl(SET 0 ALTNAME booya)		(set an altname)
5498		/server -0				(disconnect from 0)
5499		/server +booya				(reconnect to "booya")
5500	and it will connect to server 0, because server 0 has the alternate
5501	name of "booya"!
5502
5503*** News 08/25/2004 -- Alternate server names
5504	You may now give a server a list of "alternate names".  There is no
5505	limit.  You add a new alternate name with:
5506		$serverctl(SET <refnum> ALTNAME <name>)
5507	You can totaly replace the list with:
5508		$serverctl(SET <refnum> ALTNAMES <names>)
5509	<name> and <names> should be space-separated list of words.
5510
5511	You can get the list of alternate names with
5512		$serverctl(GET <refnum> ALTNAMES)
5513
5514*** News 08/25/2004 -- Aliases now shown with their argument lists
5515	When you do /alias, you now see the argument list along with all
5516	of the other stuff.
5517
5518*** News 08/25/2004 -- Mangling now supports "ALT_CHAR"
5519	How did this ever get missed?
5520
5521*** News 08/25/2004 -- New function, $mktime()
5522	Usage: $mktime(year month day hour minute second DST)
5523	The first six arguments are required.  Returns -1 on error.
5524	Returns whatever mktime(3) on your system would return, usually
5525	the number of seconds since the epoch represented by the arguments.
5526
5527*** News 08/25/2004 -- Support for ircnet's "unique id" nicknames
5528	You can now always use your "unique id" as your nickname, and also
5529	the "0" shortcut nickname, on ircnet.
5530
5531*** News 08/25/2004 -- New status expando, %{1}F
5532	This is just like %F, it displays all of the "notified" windows,
5533	except it uses the window's "notify_name" instead of its refnum.
5534
5535*** News 08/25/2004 -- New window command, /WINDOW NOTIFY_NAME
5536	If you change the /WINDOW NOTIFY_NAME, and use the %{1}F status
5537	expando, then the notify_name, and not the window's refnum, will
5538	show up.  Howl wanted to colorize the refnum up, and this is how
5539	you should do it.
5540
5541*** News 08/25/2004 -- Support for +I channel mode (ratbox)
5542	Because adm asked me to
5543
5544*** News 08/25/2004 -- User-created /SETs, /SET -CREATE   -- WARNING
5545			*** DEPRECATED ***
5546	You can create your own /set's for now with
5547		/SET -CREATE <name> <type> {<code>}
5548	where <type> is one of BOOL, STR, or INT.  <code> is code that
5549	will be run any time the user does /SET <name> <newval>.  You can
5550	/SET the value within <code> to override the user's value.
5551
5552	*** WARNING *** This interface is temporary and will go away in
5553	the future.  It will be replaced by $symbolctl() which has not
5554	yet been written, so stay tuned for more information!
5555			*** DEPRECATED ***
5556	This feature only existed in EPIC5-0.0.3 and was/will be removed
5557	in EPIC5-0.0.4.  Do not use this feature.
5558			*** DEPRECATED ***
5559
5560*** News 08/25/2004 -- Unification of symbol namespaces
5561	There is now one big table that holds all of the symbol names for
5562	aliases, assigns, built in commands, built in functions, sets, and
5563	inline expandos.  You should not notice any changes at all, except
5564	maybe epic runs faster.  This was done to pave the path towards
5565	plugins, which will need to be able to add their own commands and
5566	functions on the fly!
5567
5568*** News 08/25/2004 -- The /IRCNAME and /REALNAME commands removed here...
5569	because they are duplicates of /SET REALNAME.  Use the /SET now.
5570
5571*** News 08/25/2004 -- $stripcrap(ALL) no longer strips "ALL_OFF"...
5572	because the crap-mangler makes liberal use of ALL_OFFs and it is of
5573	no harm to leave them in there, and it does great harm to take them
5574	out. ;-)  If you want to remove them, do $stripcrap(ALL,ALL_OFF)
5575
5576*** News 08/25/2004 -- New script 'builtins' loaded from global
5577	Some things are starting to migrate from hardcoded builtins to
5578	script features.  They are not "being removed", their implementation
5579	is just changing.  This script will contain backwards compatability
5580	stuff for epic4.  You really do need this script!  Do 'make install'!
5581
5582*** News 08/25/2004 -- Automatic command completion removed
5583	You can no longer do /whoi as a replacement for /whois.  You'll have
5584	to spell out the command name in full now.
5585
5586*** News 08/25/2004 -- Using your nickname as a command removed here
5587	You can no longer do /<mynick> as an alias for /me.  Just use /me.
5588
5589*** News 08/25/2004 -- The COMMAND_COMPLETION keybinding removed here
5590	A new script replacement is forthcoming -- stand by!
5591
5592*** News 08/25/2004 -- New serverctl, $serverctl(GET <refnum> STATUS)
5593	This returns the server's current status, which is described below
5594	in the /on server_status stuff.
5595
5596*** News 08/25/2004 -- New script, 'slowcat'
5597	This script cats a file to your current target, 2 lines per second
5598	to avoid triggering flood control.
5599		/load slowcat
5600		/slowcat filename
5601
5602*** News 08/25/2004 -- New status expando, %{2}W
5603	This acts just like %W, but it shows in every window, and not just
5604	the current window.
5605
5606*** News 08/25/2004 -- New /SET, /SET OLD_SERVER_LASTLOG_LEVEL
5607	When you /WINDOW SERVER to move a window to a server that is already
5608	connected, the window's level will be set to this /set value.  This
5609	is important, because of the following situation:
5610		Window 1, server 0, level ALL
5611		Window 2, server 1, level ALL
5612	If you do /window 1 server 1  then you have two servers connected
5613	to server 1 with level "ALL".  Who wins?  Not you. ;-)  This defaults
5614	to NONE, which is probably the only sensible value.
5615
5616*** News 08/25/2004 -- /WINDOW KILL_ALL_HIDDEN kills your hidden windows.
5617	After you run this, you will be left with only your visible windows.
5618
5619*** News 08/25/2004 -- /ON TYPE !"PATTERN" acts as an exception.
5620	If you use this syntax, then the default action will occurs whenever
5621	the pattern is matched.  This is how ircII's /ON TYPE ^PATTERN works.
5622	For example:
5623			on ^msg * echo msg from $0: $1-
5624			on ^msg !"nick"
5625	In this case, if anyone but nick sends you a msg, it is echoed as
5626	in the first /on.  But if nick sends you a message, it will be
5627	displayed in the "default" way by epic, as though you did not have
5628	an on at all.
5629
5630*** News 08/25/2004 -- It is now always safe to delete ONs from within ONs
5631	Up until now, you needed to /defer the removal of any /ONs from
5632	within other /ONs, or you risked crashing epic.  This meant you
5633	could not safely stop an /ON with a higher serial number from
5634	running by deleting it.  All of this has been fixed now.  You can
5635	delete /ONs without restriction and the change takes place
5636	immediately.
5637
5638*** News 08/25/2004 -- ONs no longer compile patterns to regexes
5639	This was fraught with peril, so ONs no longer compile their
5640	patterns to regexes, and now we do things like we have always
5641	done with ONs
5642
5643*** News 08/25/2004 -- New built in function, $regcomp_cs()
5644	This is just like $regcomp(), but it's case sensitive.
5645
5646*** News 08/25/2004 -- In /ON DCC_RAW "* E *", $3 is the port number
5647	Previously it held the "othername", which wasn't terribly useful.
5648
5649*** News 08/25/2004 -- /WAIT =<fd> waits for a dcc connection to complete
5650	If you do $connect(), it is nonblocking and returns before the
5651	connection is ready to be used.  If you need to wait until the
5652	connection completes, like it did in epic4, do this:
5653			@fd = connect(host port)
5654			wait =$fd
5655	and it's pretty much the same.  This wait is of course recursive
5656	(and does not block the client)
5657
5658EPIC5-0.0.2
5659
5660*** News 08/25/2004 -- Level names are always plural, except for CRAP
5661	The levels have these names now, and they're gonna stay this way:
5662
5663		CRAP	PUBLICS	MSGS	NOTICES	WALLS	WALLOPS
5664		OPNOTES	SNOTES	ACTIONS	DCCS	CTCPS
5665		INVITES	JOINS	NICKS	TOPICS	PARTS	QUITS
5666		KICKS	MODES	USER1	USER2	USER3	USER4
5667		USER5	USER6	USER7	USER8	USER9	USER10
5668		ALL (special)	NONE (special)
5669
5670*** News 08/18/2004 -- Overloadable function aliases.
5671	When an alias name "collides" with a built in function, the built in
5672	function has traditionally been called.  This update changes this
5673	behaviour to calling the alias first.
5674
5675	NOTE:  This will cause recursive loops in scripts that rely on this
5676	behaviour.  To fix this the aliases in question need to be renamed or
5677	rewritten to use the following ::function() feature.
5678
5679	It is possible to call the built in with the :: notation used for
5680	global variables, as in $::function().  $:function() will explicitly
5681	call the alias.
5682
5683	NOTE:  Do not use the $::function() and $:function() features just yet,
5684	as they will crash epic if the alias or the built in doesn't exist.  It
5685	is safe to use if you are sure they do though.
5686
5687*** News 08/02/2004 -- New commands for $dccctl().
5688	$dccctl(readables) will return the refnums of DCCs that have data
5689	waiting to be read and $dccctl(get [refnum] readable) will return a 1
5690	or 0 depending on whether the given refnum is readable or not.
5691
5692	Since epic will automatically read data from all unheld DCCs, this
5693	feature is expected to be useful only for DCCs in the "held" state.
5694
5695*** News 08/02/2004 -- General improvements to the flood detection system.
5696	Flood detection now works for channel PARTS and for ctcp replies, which
5697	is bound to the NOTICES flood.
5698
5699	Also, the first argument from each flood returned from $floodinfo()
5700	when flood_maskuser is set to 1 or 2 is now a valid user@host mask for
5701	the flooder in question, suitable for putting in a ban or kline.
5702
5703*** News 08/02/2004 -- New argument for /on flood.
5704	The fourth argument ($3) in the flood hook is now the number of repeats
5705	of the flood in question.  This makes it easy to deal with particular
5706	kinds of floods in different ways, as they occur.  For example:
5707
5708	/on flood "% parts % 5" mode $2 +b *!*@$after(@ $userhost())
5709	/on flood "% ctcps % 5" mode $2 +b *!*@$after(@ $userhost())
5710	/on flood "% % % 50" mode $2 +b *!*@$after(@ $userhost())
5711
5712*** News 08/02/2004 -- Improvements to $floodinfo().
5713	$floodinfo() will now accept as input the same list of lists it
5714	outputs.  The lists themselves don't have to be complete.  Any
5715	unspecified arguments will match all records.  For example:
5716
5717	$floodinfo("% #chan joins")  # Return all join records for #chan.
5718	$floodinfo(*)                # This still works.
5719	$floodinfo($floodinfo(*))    # Same output as above.
5720
5721	Feeding $floodinfo() output back into its input is useful for tuning
5722	the flood /sets by seeing which non-flooders are being caught long term
5723	in the system.
5724
5725	The fields are these:
5726
5727	u@h mask that matches the flooder.  Defaults to "*".
5728	channel mask.  Defaults to "*".
5729	flood type mask.  Defaults to "*".
5730	Server number.  Defaults to -1, which matches all.
5731	Numeric minimum number of flood hits.
5732	Numeric minimum duration of flood.
5733	Numeric minimum flood rate.
5734
5735	The last three numeric arguments may be negative, in which case, they
5736	specify the _maximum_ values.  These fields make it possible to deal
5737	with different kinds of floods in different ways _after_ they occur.
5738	For example, a join flood may be falsely triggered by a net join, but
5739	it is reasonable to expect that if you have join and part flood records
5740	for the same u@h, then it is participating in a join/part flood.
5741
5742	/on flood "% parts % 5" {
5743		if (floodinfo("$userhost() $2 joins $servernum() 5")) {
5744			mode $2 +b *!*@$after(@ $userhost())
5745		}
5746	}
5747
5748	Or alternately:
5749
5750	/on flood "% joins % 5" {
5751		if (floodinfo("$userhost() $2 parts $servernum() 5")) {
5752			mode $2 +b *!*@$after(@ $userhost())
5753		}
5754	}
5755
5756*** News 08/02/2004 -- Changes to /userhost and notify.
5757	The changes to the ison back end mentioned in the previous entry now
5758	also apply to the userhost back end, along with the caveats relating to
5759	/wait and flush.  This applies to the /userhost, /userip and /usrip
5760	commands.
5761
5762	A new option has been added to these commands.  /userhost -count
5763	[number] will change the number of items that epic will put into each
5764	USERHOST request.  This isn't a particularly significant change since
5765	this number is already tuned to a number that works on all servers.
5766
5767	To change the number of USERHOST requests sent at one time, use
5768	$serverctl(set [servernum] maxuserhost [number]).  Set it to 0 to turn
5769	the new behaviour off.
5770
5771*** News 07/08/2004 -- Changes to /ison and notify.
5772	The back end of the notify system and the /ison command has been
5773	changed to permit only a certain number of ISONs to be sent to a server
5774	at one time.  The benefit of this is that it will typically prevent a
5775	large notify list flooding the client off the server.
5776
5777	The down side is that it will cause scripts like $is_on() in script/guh
5778	that use "/wait for ison .." to fail until they have been fixed.  The
5779	fix is to put "@ serverctl(set $servernum() maxison 0)" at the top of
5780	any alias that uses it.  This will turn the new behaviour off.
5781
5782	The notify system itself will not queue an ISON to be sent if there are
5783	any ISONs waiting to be sent, but the /ison command will.
5784
5785	One final note is that the "waiting to be sent" queue won't be flushed
5786	when the client reconnects to the server or when "/ison -f" is run.
5787	This won't cause any particular damage, but it's not nice and will
5788	probably change soon.
5789
5790*** News 07/08/2004 -- Userhost updating in NICK changes.
5791	This is relevant to those who use the $serverctl() maxcache feature,
5792	which, if in effect, will prevent a /who message being sent to a
5793	server, and thereby make $userhost() fail for every nick that joined
5794	the channel before the client did.
5795
5796	This patch will grab the userhost information for these users from the
5797	NICK message itself, and help to rebuild the $userhost() database
5798	faster.  It also makes it possible to manually get it into the database
5799	by /pretend'ing a NICK message with a userhost obtained from other
5800	sources such as the /userhost command.
5801
5802*** News 03/19/2004 -- New built in function, $tobase(<base> <num>) [howl]
5803	This function converts <num>, a number in base 10, to base <base>.
5804	For example, $tobase(16 65536) returns "10000"
5805
5806*** News 03/19/2004 -- New built in function, $strtol(<base> <num>) [howl]
5807	This function converts <num>, a number in base <base> to base 10.
5808	For example, $strtol(16 10000) returns "65536"
5809
5810*** News 03/19/2004 -- Changes to /WINDOW NOTIFY, /WINDOW NOTIFIED
5811	These two /WINDOW operations now take ON, OFF, or TOGGLE arguments,
5812	instead of taking no arguments and behaving as toggle switches.
5813	If you do not provide an argument, they show you their current
5814	values as the other /WINDOW boolean values do.
5815
5816*** News 03/19/2004 -- Addition and changes to $windowctl()
5817	$windowctl(GET <refnum> MISCFLAGS) always returns 0, and
5818	$windowctl(GET <refnum> NOTIFY) returns 1 if /window notify is on
5819	$windowctl(GET <refnum> NOTIFIED) returns 1 if /window notified is on.
5820	NOTIFY and NOTIFIED replace MISCFLAGS.
5821
5822*** News 03/19/2004 -- New key binding, SWITCH_QUERY
5823	Whenever a window has multple nicknames in its nickname list,
5824	and one of those nicknames is active as the window's query, it
5825	is possible to use this binding to switch between all of the
5826	nicks in the nick list, just in the same way you can switch
5827	between channels using SWITCH_CHANNELS.  If the window does not
5828	have an active query, this key binding will have no effect, even
5829	if the window has nicks in its nicklist!
5830
5831*** News 03/19/2004 -- Unification of /WINDOW QUERY and /WINDOW ADD
5832	Historically, when you /WINDOW QUERY (or just /QUERY) <NICK>, then
5833	it would add <NICK> to the window's "NICK LIST".  The "NICK LIST"
5834	is a list of nicknames for which output goes to that window, just
5835	like output to channels go to windows.  Output to or from a nick
5836	that is not on any window's "nick list" goes to the LEVEL_MSG level.
5837	When you used /WINDOW QUERY <NICK2> to change the query, it would
5838	remove the old query from the nick list, and messages to and from
5839	the original query went back to LEVEL_MSG.
5840
5841	Well, this has been unified somewhat.  Now the following rules apply:
5842	1) When you /WINDOW QUERY <NICK>, then <NICK> is added to the
5843	   window's nick list.
5844	2) If the window already has a query, then the old query nickname
5845	   is NO LONGER REMOVED from the window's nick list.  Output to
5846	   that nick will continue to go to the window as it had before.
5847	3) When you use /WINDOW QUERY to cancel a query, then the current
5848	   query IS STILL REMOVED from the window's nick list, and output
5849	   to or from that nick will go to LEVEL_MSGS.
5850
5851	It is no longer possible to have a window query that is not on the
5852	window's nicklist, because the query is selected from the members of
5853	the window's nicklist, rather than being a separate thing.
5854
5855*** News 03/17/2004 -- Change to how /SET INDENT behaves
5856	Historically, if you have /SET INDENT ON, and the first word of the
5857	first line of output is wider than 1/3 of your screen, then the
5858	second (and subsequent) line(s) of output are NOT INDENTED.  This
5859	has been changed so subsequent lines are indented 1/3 of the window's
5860	width.  To understand this change, think about how /set indent usually
5861	works, and if it would indent more than 1/3 of your screen, then it
5862	will indent 1/3 instead of not at all.
5863
5864*** News 03/17/2004 -- New flag to /XECHO , /XECHO -F
5865	If you use the /XECHO -F flag, "hidden window output notification"
5866	will not occur for any hidden windows that receive the output.
5867
5868*** News 03/16/2004 -- You can now bind the 255 character (�)
5869	There has been a problem with the new key binding system that
5870	made it difficult for Russian language speakers to bind the 255
5871	character which is in their alphabet.  This should be fixed now.
5872
5873*** News 03/16/2004 -- Can now join channels simultaneously per window
5874	Previously, if you attempted to join multiple channels in the same
5875	window simultaneously, you were not assured that all of the channels
5876	would go to that window.  Now you can be assured of this.  This should
5877	make reconnection/rejoin scripts much more sane.
5878
5879*** News 03/16/2004 -- New built in function, $startupfile()
5880	This expands to the file that the client loaded at startup as your
5881	"startup file".  Usually this is ~/.ircrc or ~/.epicrc or whatever
5882	you specified as the IRCRC environment variable or the argument to
5883	-l or -L on the command line.
5884
5885*** News 03/16/2004 -- Unknown CTCP requests offered via /ON CTCP_REQUEST
5886	It was pointed out that unknown/unhandled CTCP requests were only
5887	being hooked through /on ctcp, so it wasn't possible to use
5888	/on ctcp_request to handle EVERY request.  Well, now unhandled CTCPs
5889	are hooked through both /on's just like handled CTCPs are.
5890
5891*** News 03/16/2004 -- Semantic changes to $connect()
5892	You used to be able to depend on /ON DCC_RAW "% % E %" or
5893	/ON DCC_RAW "% % C" hooking before $connect() returned.  Now that
5894	$connect() is nonblocking, YOU CAN NO LONGER DEPEND ON THIS.  You
5895	must set up your script to assume that /ON DCC_RAW will be hooked
5896	asynchronously, after at least the next sequence point.  Think of
5897	it as being like not being able to depend on /WHOIS returning the
5898	numerics.  I'll probably add a way to /wait for a connection in the
5899	future.  Stay tuned.
5900
5901*** News 03/16/2004 -- DCC connections are now nonblocking
5902	All connect()ions for DCC, including /DCC GET, /DCC CHAT, /DCC RESUME
5903	and $connect() are all fully nonblocking.  This means all connects
5904	in EPIC are now fully nonblocking! HUZZAH!
5905
5906*** News 03/15/2004 -- /HELP command now handled by script
5907	The built in /HELP command has been replaced by a script that
5908	was written by howl for our use.  Much thanks to him!
5909
5910*** News 03/14/2004 -- Six new USER lastlog levels
5911	You may now use USER5, USER6, USER7, USER8, USER9, and USER10
5912	as levels with your window, lastlog, flood, and ignore.  Just
5913	use /xecho -l USER5 for example to send to your USER5 window.
5914
5915*** News 01/20/2004 -- kqueue() support
5916	You can uncomment #define USE_FREEBSD_KQUEUE in newio.h if you
5917	want to play around with this experimental feature.
5918
5919*** News 01/15/2004 -- /WINDOW DISCON and /WINDOW NOSERV now the same
5920	There was a subtle semantic difference between /WINDOW DISCON
5921	and /WINDOW NOSERV that had to do with the window's "last server"
5922	that was used for reconnects.  Because the client no longer does
5923	reconnections, this difference is moot.  These two commands now
5924	always do the same thing, which is to disassociate the window
5925	with any server.  The window becomes "server-less".
5926
5927*** News 01/15/2004 -- Changes to /SERVER command
5928	/SERVER
5929	     Show the server list.
5930	/SERVER -DELETE <refnum|desc>
5931	     Remove server <refnum> (or <desc>) from server list.
5932	     Fails if you do not give it a refnum or desc.
5933	     Fails if server does not exist.
5934	     Fails if server is open.
5935	/SERVER -ADD <desc>
5936	     Add server <desc> to server list.
5937	     Fails if you do not give it a <desc>
5938	/SERVER +<refnum|desc>
5939	     If the server's state is "CLOSED", change it to "RECONNECT".
5940	     This allows the server to reconnect if windows are pointed to it.
5941	     Note: server reconnection is asynchronous
5942	/SERVER -<refnum|desc>
5943	     Unconditionally close a server connection
5944	     Note: server disconnection is synchronous!
5945	/SERVER +
5946	     Switch windows from current server to next server in same group
5947	/SERVER -
5948	     Switch windows from current server to previous server in same group
5949	/SERVER <refnum|desc>
5950	     Switch windows from current server to another server.
5951
5952*** News 01/08/2004 -- /ON WIDELIST went away here
5953	This /ON hasn't been hooked in many a year, and here it officially
5954	passed into the void.
5955
5956*** News 01/07/2004 -- Removal of WINDOW BIND feature
5957	As part of the larger project to decouple windows from channels,
5958	the "window bind" feature has been removed.  This means you can
5959	no longer /WINDOW BIND, /WINDOW REBIND, /WINDOW UNBIND, and you
5960	cannot use $windowctl(* BIND_CHANNEL *) or $winbound().  It is
5961	expected that eventually scripts will take over the job of routing
5962	channels to the appropriate windows and EPIC will stay entirely
5963	out of the way.
5964
5965*** News 01/07/2004 -- New /ON, /ON SERVER_STATUS
5966	This /ON is thrown every time a server changes its "state".
5967	The states are listed below in "Server States" and I won't
5968	go into that again here.
5969		$0 - The server changing state
5970		$1 - The old status (a string, not a number)
5971		$2 - The new status
5972	If you find that you do something particularly onerous in
5973	this /ON and EPIC panics or crashes, try /DEFERing it, and
5974	if that doesn't work either, let me know.
5975
5976*** News 01/07/2004 -- Removal of NOTE support
5977	I doubt anyone will notice this, and if you do, bummer.
5978
5979*** News 01/07/2004 -- Server states
5980	Servers now exist in one of several "states" each time it connects
5981	to the server.  It moves through each of the states from start to
5982	end, and stays at the end until manually reset by the user (or script)
5983
5984	RECONNECT	As soon as a window is attached to the server, the
5985			server should be connected to.
5986	CONNECTING	A connection to the server is in progress.  The server
5987			is not ready to be used.
5988	REGISTERING	We are attempting protocol registration (NICK/USER)
5989			with the server.  The server is open, but we cannot
5990			really use it yet.
5991	SYNCING		Our registration has been accepted and we're doing
5992			whatever meta-tasks are needed to get the connection
5993			fully active
5994	ACTIVE		The connection is fully ready for all use.
5995	EOF		An End Of File (EOF) has been detected from the server.
5996			The connection was closed by the server and cannot be
5997			used any longer.
5998	CLOSING		The connection to the server is being shut down.  If
5999			the previous state was "ACTIVE" then you can still
6000			send something to the server.  If the previous state
6001			was "EOF" then it's too late.  You cannot stop the
6002			closing of a server.
6003	CLOSED		The server is disconnected and cannot be used.  The
6004			server (and any windows connected to this server) stay
6005			in this state until the user resets the state to
6006			RECONNECT.
6007
6008*** News 01/07/2004 -- Channels are not tracked across disconnects
6009	When you are disconnected from a server for *any* reason, EPIC
6010	will not retain knowledge of the channels for the next connection
6011	and will not rejoin them.  It is expected that scripts will use
6012	this to their advantage to fully control the semantics you will
6013	have governing "auto-rejoin-on-reconnect".
6014
6015*** News 01/07/2004 -- Server connections are now brought up asynchronously
6016	When you do /WINDOW SERVER or /SERVER or otherwise change the
6017	server of a window, the server is not immediately connected or
6018	disconnected, and the change will not take effect until the
6019	next time through the event looper.  This means that all server
6020	connections are "asychronous" (they don't interrupt the current
6021	flow of the script).  This means you most definitely cannot
6022	do /WINDOW SERVER <host> CHANNEL <channel> any more.  So please
6023	stop doing that. ;-)  Use /ON SERVER_STATUS to join channels.
6024
6025*** News 01/07/2004 -- /XDEBUG SERVER_CONNECT a lot more interesting
6026	If you want to watch epic work its gory nonblocking connects,
6027	you can turn on this /xdebug and see everything in its glory.
6028
6029*** News 01/07/2004 -- Nonblocking server connects
6030	EPIC now does all server connections using asynchronous,
6031	nonrecursive, nonblocking connections.  And yes, it still
6032	supports multiple protocols and multiple addresses (ie,
6033	"us.undernet.org"), and *yes*, it will try another address if
6034	a server refuses us registration ("You do not have access to
6035	this server").
6036
6037*** News 01/07/2004 -- EPIC no longer tracks server "dialect" per se
6038	The $version() string now always returns "2.8" since all
6039	servers are nominally 2.8 class (rfc1459) servers, and epic
6040	does not attempt to determine if it's an undernet, ircnet,
6041	efnet, or dalnet server, etc.  This is mostly because scripts
6042	can hook /on 004 if they care, and the 005 numeric (ISUPPORT)
6043	is making dependance on the server's version much less important.
6044
6045*** News 01/07/2004 -- EPIC loads ~/.ircrc (or ~/.epicrc) on 001 now
6046	Traditionally, ircII has loaded your ircrc when it received
6047	the 002 numeric, and traditionally, epic has done it when it
6048	received the 004 numeric.  Due to some refactoring in epic,
6049	it is now possible for epic to load your ircrc when it receives
6050	the 001 numeric *and before it hooks /on 001*  This means you
6051	shouldn't have to suffer the default epic output for any of
6052	the numerics from the server.
6053
6054*** News 01/07/2004 -- Usermodes now tracked as strings instead of bits
6055	Before this change, ircII clients had always tracked your user
6056	and channel modes as bits, and the valid (supported) modes were
6057	hardcoded into the client at compile time.  With this change,
6058	EPIC will no longer track your modes using bits, but instead
6059	using strings.  This means that epic won't need source code
6060	changes to support new modes from your server.  You can't do
6061	$serverctl(SET|GET <refnum> UMODES) any more (but the old
6062	"UMODE" still works)
6063
6064*** News 01/07/2004 -- /ON wildcard patterns now compiled into regexes
6065			*** OBSOLETE ***
6066	At or around this date, EPIC started converting wildcard patterns
6067	used by /ON into extended POSIX regexes and compiling them, and
6068	using the regexes instead of the pattern matcher.  In the future,
6069	epic will allow you to specify your own regexes.  "Flexible"
6070	/on hooks are still wildcard pattern matched (for now) because
6071	recompiling the pattern every time the /on is thrown is senseless.
6072			*** OBSOLETE ***
6073	This feature was removed (see note above for 08/25/2004)
6074			*** OBSOLETE ***
6075
6076EPIC5-0.0.1
6077
6078*** News -- 12/16/2003 -- New levels, KICK, QUIT, and MODE
6079	So just for a canonical list, here are all of the levels supported
6080	by flood, ignore, lastlog, and windows:
6081		CRAP	PUBLICS	MSGS	NOTICES	WALLS	WALLOPS
6082		OPNOTES	SNOTES	ACTIONS	DCCS	CTCPS
6083		INVITES	JOINS	NICKS	TOPICS	PARTS	QUITS
6084		KICKS	MODES	USER1	USER2	USER3	USER4
6085		USER5	USER6	USER7	USER8	USER9	USER10
6086		ALL (special)	NONE (special)
6087
6088*** News -- 12/16/2003 -- Unification of ignore, flood, and lastlog levels
6089	Previously, the ignore, flood, and lastlog levels used the same
6090	names, but they had different meanings in each subsystem (ie, CRAP
6091	in flood was different from CRAP in ignore, and CRAP in lastlog).
6092	Now all three subsystems use the same levels, all named the same,
6093	and (more or less) all defined the same.  There are some holes in
6094	this conversion cause I didn't check every possible combination.
6095	Report any odd behavior to me so I can fix it.
6096
6097*** News -- 12/16/2003 -- New noise type for /ON, /ON %TYPE
6098	The /ON %TYPE modifier acts just like /ON ^TYPE, because it
6099	suppresses the default action, but it is unlike /ON ^TYPE
6100	because it does not turn off the display (what /ON ^TYPE
6101	does is it prefixes all the commands in the ON body with
6102	the ^ modifier, which turns off output for that command.)
6103	This new modifer does not prefix each command with ^, so any
6104	commands not so prefixed will generate their normal output.
6105	The idea is you can use this for /on set's
6106		/ON %SET "HOLD_MODE *" {WINDOW HOLD_MODE $*}
6107
6108*** News -- 12/16/2003 -- Removed /SET BEEP_WHEN_AWAY
6109	This feature can be re-implemented in one line of script:
6110		/ON #MSG 617 * {IF (A) {BEEP}}
6111
6112*** News -- 12/16/2003 -- Removed /SET BEEP_ON_MSG
6113	The /SET BEEP_ON_MSG feature has been removed because it was only
6114	half-implemented, and even that half didn't work right.  Keep an
6115	eye out for a scripted re-implementation of this in the future.
6116
6117*** News -- 12/16/2003 -- Runtime auto-append-of-$* removed
6118	Historically, the ircII language has allowed you to auto-append
6119	$* onto the end of an alias at runtime by creating an alias that
6120	does not refer to any of the command line arguments.  For example,
6121		/alias m msg
6122	behaves at runtime as
6123		/alias m msg $*
6124	but with a performance penalty.  This behavior has now been removed
6125	and if you wish to have $* appended to your aliases, you need to
6126	change them.  This change would be backwards compatable with epic4.
6127
6128# End of file
6129