EPIC4pre2 *** News 06/18/99 -- New flag to $info, $info(v) The $info(v) function call returns the "class major minor" version information. For example, when this item was written, $info(v) was to return "epic4 pre2 004", indicating an epic4pre2.004 class client. Other clients may very well use $info(v) to return version information, and hopefully they wont use 'epic4' as the 'class'. =) The reason this is being added is because technically speaking, looking at $J for the version info is a bad idea, and $V is good, but $V overlaps for all the different classes of ircII clients. So if (word(0 $info(v)) == [epic4]) then you know youre using an epic4 client. *** News 05/28/99 -- New built in function, $ttyname() It just calls the ttyname(3) function, which returns the name of the tty that the epic process is attached to, if for whatever reason you care about that. *** News 05/28/99 -- New built in function, $lastlog() This function roughly simulates the /lastlog command, except it returns a list of numbers that you can pass to $line() to get interesting information from the lastlog. The syntax is: $lastlog("window desc" "pattern" "lastlog level") There must be exactly three arguments passed to this function, and so if any of them contain spaces, you will need to use double quotes to protect the wording. The function will return all lines in the lastlog buffer of the specified "window" that match "pattern" and also are of one of the types contained in "lastlog level". For example: $lastlog(0 *foo* ALL) Returns all of the lines that contain the string 'foo' of any lastlog level type in the current window. Important note #1: Lastlog line numbers are counted from the bottom of the display to the top. The most recently displayed line is always numbered 0. The line numbers are also not static. Lines are continually being added and deleted for each new line of output. This function returns the line numbers in numeric order, which means from the bottom up. If you want to traverse from the top down, you will need to pass the return value of this function through $revw() to get them in the desired order. Important note #2: Because 'echo'ing to the screen changes the order of the line numbers, extreme caution must be used when outputting anything based on the $lastlog() command -- if you are not careful to compensate, you might just retreive the wrong line. It is _not_ my fault if this happens. *** News 05/28/99 -- Two new extensions to the $line() function: First, you may now pass a window name or refnum as the optional second argument. Previously, you could only pass in a window refnum. Second, you may also specify the literal word "-LEVEL", and the return value of $line() would include the lastlog level of the requested line as the first word: For example: $line(0 -LEVEL) Might return "CRAP This is some text" *** News 05/07/99 -- New function, $realpath() If your system provides the realpath(3) library call, then this function will convert a relative or absolute pathname into a canonical pathname. All symlinks, and any '..' or '.'s are handled. Note that *THE DIRECTORY PART OF THE PATH YOU PASS TO THIS FUNCTION MUST ACTUALLY EXIST*, because this is how the library call works. If an error occurs (such as the path not existing), the false value is returned. If the realpath library call is not available on a system, then this function will simply return the arguments as-is. *** News 05/07/99 -- New scripts, 'dig' and 'debug.irc' Refer to them for more information. *** News 05/07/99 -- New function, $indextoword() This function converts an $index()-type return value to a $word()-type argument, so that you can extract the entire word from a string that contains a character that you know about. For example: $word($indextoword($index(! $*))) would return the entire word that contained the first instance of the bang character in $*. This might be useful to extract words from the input line, when used with $curpos() and $L. *** News 05/07/99 -- 20 new /set status_user's. There are now 20 new /set status_user's available, for a grand total of 40. The new values are /set status_user20 through status_user39. They show up on your status bar as %{2}0 through %{3}9. The difference between these 20 and the other 20 is that these always display on all your windows, not just the current-type window. *** News 04/08/99 -- New feature to aliasctl, $aliasctl(* exists *) This new verb to aliasctl returns 1 if the indicated alias/assign exists and 0 if it does not. *** News 02/01/99 -- New operator in new math paser, <=> If you are a user of the new math parser (see below, /xdebug new_math) then there is a new operator available. The <=> operator is a binary operator that takes two lvalues and swaps the rvalues of each operand. For example, if $foobar is 1 and $booya is 2, then @ foobar <=> booya Results in $foobar being 2 and $booya being 1. The operator is right to left associative, which permits you to string them together to get a "shift rvalues to the right" operation. *** News 02/01/99 -- New built in /set, /SET NEW_SERVER_LASTLOG_LEVEL Some users do not appreciate that when you do a /window server operation, that the lastlog level of the window is changed to LOG_ALL. So this /set now controls what it will be set to. The default is (obviously) LOG_ALL. Some of you will probably change this to LOG_NONE, I suppose. *** News 02/01/99 -- New built in flood/ignore levels (srfrog) There are three new flood-protection types, and three new ignore levels: "TOPIC" "JOIN" "NICK" respectively covering topic changes, channel joins, and nickname changes. *** News 02/01/99 -- New built in /set, /SET RANDOM_LOCAL_PORTS For the delusionally paranoid, you can /set this to ON if you want EPIC to make a token attempt to use a random port for each outbound DCC request. If EPIC randomly picks a port that is in use, then as a fallback, it will just ask the operating system for a port (to avoid resource starvation). *** News 02/01/99 -- New built in /set, /SET RANDOM_SOURCE EPIC now has more flexibility in what it uses as its random number source. You may now choose between three random number sources by setting this /set to one of the following values: 0 - Use the /dev/urandom device PRO: Reasonably good source of non-repeating numbers. PRO: Reasonably good source of entropic numbers. CON: Not widely implemented outside of linux/freebsd 1 - Use the classic ircII psuedo-random number generator PRO: Very good source of non-repeating numbers. PRO: Always available CON: Numbers generated have almost no entropy. 2 - Use the alternative epic gettimeofday() generator PRO: Almost always available PRO: Numbers generated have modest entropy CON: Poor source of non-repeating numbers. If you /set this to 0 or 2, and the appropriate mechanism is not available, then it will silently use the built in psuedo-random number generator, which is always available. This variable is used by the global random number generator, which is used by the DCC random port guesser (see above), the $random() built in function, and the $randread() built in function. *** News 02/01/99 -- New built in function, $hash_32bit() (srfrog) This function takes a case-insensitive string as its first argument (so if it has spaces, you need to surround it with double-quotes) and an optional argument specifying the number of characters to hash, and converts that number of characters in the string into a 32 bit integer. The 32 bit hash result is returned. *** News 01/25/99 -- New feature, alias argument lists This is kind of hard to explain, and I implemented it all in one day, so if you try real hard to break this, you probably will. You may now supply argument lists to your aliases. An alias list is one or more local variables that will be given portions of the arguments passed to your alias. For example: /alias a1 (var1, var2) {echo $var1, $var2) then /a1 one two $var1 becomes "one" and $var2 becomes "two". $* is the empty string. - If the user passes more arguments than you have on your list, then all of the excess arguments will go to the last variable. So in the above example, if you do: /a1 one two buckle my shoe then $var1 becomes "one" and $var2 becomes "two buckle my shoe". $* is the empty string. - If the user passes less arguments than you have on your list, then all of the excess variables will recieve the empty value. So in the above example, if you do: /a1 one then $var1 becomes "one", and $var2 is the empty string and $* is the empty string. - If you would rather have the variables in the list just "shift off" the first few variables and leave the rest of the arguments in $*, then you can specify your last variable as "...", which will just pop off as many words as neccesary and leave the rest in $*. So in this example: /alias a1 (var1, var2, ...) {echo $var1, $var2) then /a1 one two buckle my shoe $var1 is "one", $var2 is "two", and $* is "buckle my shoe". - If you would like to have any extra arguments thrown away, then you can specify the last variable as "void". In this example: /alias a1 (var1, var2, void) {echo $var1, $var2) then /a1 one two buckle my shoe $var1 is "one", $var2 is "two", and $* is the empty string. - If you would like to provide a default value for a variable, just in case there is not an argument that should be there, you can specify it with the "default" qualifier. /alias a1 (var1, var2 default "baz") {...} So if you do: /a1 one Then $var1 is "one", and $var2 is "baz" (because it is the default value you specified) and $* is the empty string. The default value is limited to one extended word, so if you want to have spaces in it, you need to surround it with double-quotes. The default value will be expanded, so you may have expandoes (such as $C) in it. *** News 01/13/99 -- New built in /set, /SET TERM_DOES_BOLD_BLINK (knghtbrd) If your terminal emulator does bold background colors when you set the blinking attribute, you can /set this to ON to give a hint to the client that it is ok to output the BLINK attribute in places where it would otherwise not do so. A specific example is for the ^C background colors 00-15, of which 4 are "bold". If this /set is OFF, those 4 colors are always normal intensity, and if this /set is ON, then those 4 colors will be "blinked", and hopefully your emulator will turn that into a bold background color. *** News 12/17/98 -- Built in command /cycle repealed The built in command /cycle has been repealed. The restriction that required its implementation has also been repealed. You may now do /quote part, and so you can use your old /cycle alias. *** News 12/17/98 -- New built in function, $functioncall() This built in function can be used to determine if your user alias was called as a command (eg, /foobar) or as a function (eg, $foobar()) If your user alias was called as a function, $functioncall() will return 1. Otherwise, it will return 0. *** News 12/17/98 -- Slight change to built in function argument passing Historically, built in functions have returned the false value when a required argument was considered to be "missing". However, a single space, delimited by quotation marks, has also been considered to be "missing", so that something like: $strip(" " one two three) returned nothing, because the required first argument was "missing". This has been corrected, so that quote-space-quote is now a valid argument that is not "missing", and that argument contains a single space in it. This permits you to pass a space as a required argument to any function by enclosing it in double quotes. Of course, this only impacts functions that interpret their arguments as a list of words. *** News 12/11/98 -- New window action, /window refnum_or_swap It has been pointed out that there is no atomic way to make a given window both current and visible, without failure. This action provides that capability. It is passed one argument, the refnum or name of the window to be made current. If the window is visible, then the client makes that window current (as /window refnum would do). If the window is hidden, then the client swaps the window in and makes it current (as /window swap would do). This action never fails unless you specify a window that doesn't exist. *** News 12/11/98 -- New built in command, /usrip EFNet has decided to re-implement the /userip command from undernet and give it a gratuitously different name. Ugh. See /userip for more information. *** News 12/11/98 -- Status line expando %S changed, always displays Due to overwhelming request, the %S status-line expando now always displays the server information, even if you are not on multiple servers. If you have a severe problem with this change, please let me know. *** News 12/11/98 -- Clarification of $winchan() and $chanwin() Nuke has asked me to officially clarify that if you specify a channel argument, a second argument is optional. The optional second argument is the server refnum from which you are interested in the channel. This is to clarify between two channels of the same name on two different servers, obviously. *** News 11/10/98 -- /on switch_windows extended a bit I am documenting this here because there have been some changes (improvements) which contradict the previous documentation for /on switch_windows, so a record is needed. Anyhow, as far as i can tell, the client now will hook /on switch_windows _every_ time the current window is changed, not just in some select situations. Hopefully this will make everyone happy. =) *** News 11/03/98 -- $servername(), $servernick(), $serverports() changed They are now all happy if you do not provide them with any arguments, as they will default to the current server refnum (from_server). *** News 11/03/98 -- New built in function, $prefix() The $prefix() function purports to return the longest string that is a common leading substring to all the words in the given word list. For example: $prefix(one two three) returns the false value $prefix(p1 p2 p3) returns "p" $prefix(one-1 one-2 one-3) returns "one-" *** News 11/03/98 -- New built in function, $maxlen() The $maxlen() function purports to return the length of the longest string in the given word list. You figure it out. ;-) *** News 11/03/98 -- New verb for /window, /window clear This is a pretty obvious one -- how did it get overlooked? Pretty simple. It clears the current window. *** News 09/28/98 -- /on dcc_lost hooked for auto-dcc reject When the client auto-closes your dcc's because they have excceded the timeout specified in /set dcc_timeout, the client will hook /on dcc_lost for you with the pertinent information. *** News 09/28/98 -- New verb for $aliasctl(), pmatch (Colten, nutbar) You may now do pattern matching on your aliases and assigns by specifying "pmatch" instead of "match". Unlike the "match" on bitchx, this does not auto-append a *, so if you want "match" like behavior, remember to put it on the end. Examples: $aliasctl(alias pmatch *foo) returns all alias names that *end* with "foo" $aliasctl(assign pmatch *g*) returns all assign names that contain a "g". *** News 09/28/98 -- New built in function, $isaway() (nutbar) You give it a server refnum it tells you if youre away on that server. The default argument is the current server. The "special" argument of -2 returns 1 if you are away on any server, 0 if you are "here" on every server. *** News 09/28/98 -- New flags to /exec, -line, -error, -end These flags allow you to specify code that will be executed for any of the output events from an /exec'd command. For example: exec -line { echo stdout: $* } -error { echo stderr: $* } -end { echo ALL DONE! } ls Note that /exec -end just does a /wait %proc -cmd for you (really), so it doesnt save you any time to do it that way. *** News 09/28/98 -- Semantic change to local variables Do to exceeding popular request, all local variables are "owned" by their closest enclosing atomic scope and NOT by the closest enclosing syntactic scope. The /bless command does not affect this rule in any way. The following illustrates the change: alias foobar { local a 4 if (1) { # a is 4 here local b 5 } # b is still around here, with the value 5. echo [$a] [$b] } *** News 09/28/98 -- New built in function, $getopt() (Crackbaby) $getopt( ) Processes a list of switches and args. Returns one switch char each time it's called, sets $ to the char, and sets $ to the value of the next argument if the switch needs one. Syntax for and should be identical to getopt(3). A ':' in is a required argument, and a "::" is an optional one. A '-' by itself in is a null argument, and switch parsing stops after a "--" If a switch requires an argument, but the argument is missing, $getopt() returns a '-' If a switch is given which isn't in the opt string, the function returns a '!' $ is still set in both cases. Example usage: while (option = getopt(optopt optarg "ab:c:" $*)) { switch ($option) { (a) {echo * option "$optopt" used} (b) {echo * option "$optopt" used - $optarg} (c) {echo * option "$optopt" used - $optarg} (!) {echo * option "$optopt" is an invalid option} (-) {echo * option "$optopt" is missing an argument} } } *** News 09/28/98 -- Lots of changes with key bindings and /bind command * You no longer have to do this: /bind ^[ meta1 /bind meta1-[ meta2 /bind meta2-1 metaN ... You can now do: /bind ^[ meta1 /bind ^[[ meta2 /bind ^[[1 metaN And the client wont whine at you. * /set meta_maps controls the number of META states you have, there is no limit, but there is a floor of 5 meta maps (meta0 through meta4). Yes, you can have as many or as few as you want! =) Note that decreasing this value will destroy any bindings that depend on states that are going away, the client auto-garbage collects them and theyre gone forever. Just be forewarned. * You no longer have to do the first thing, you can just do: /bind ^[[11~ scroll_back The client will automagically bind all the intermediate steps to open meta states and you dont have to worry about negotiating the meta maps (as long as you use this all the time, the client will not get confused, but if you start messing around, you might lose some of your binding chains.) * /bind accepts a special argument, '-default' which is like /dump for your keybindings, but it restores the defaults so you can continue to type. =) *** News 09/28/98 -- Add per-window status formats Each window may now have its own, independant status_format variable seperate from the global defaults. Theyre just like the normal status formats, except you access them through the /window command: /window status_format "..." /window status_format1 "..." /window status_format2 "..." It is recommended that you put double-quotes around the status format as it probably contains spaces and you will want it parsed as just one argument. Kanan has bugged me for this feature for years, so hopefully he wont be the only one using it. ;-) *** News 09/28/98 -- New flag to /xquote, -ALL (Colten) With /xquote -all, you can send something to every connected server, perhaps client-side away handling... *** News 09/28/98 -- $aliasctl(assign match) added. (Colten) You can now match variables in addition to aliases. *** News 09/28/98 -- New expression parser (IN DEVELOPMENT) There is a new expression parser you can play around with by doing /xdebug new_math. Note that this /xdebug will probably be retained in the future and will be a no-op, so its safe to use in your scripts. More about the new expression parser when its closer to being finished. *** News 09/28/98 -- New set, /set max_reconnect Supposedly, this limits the total number of times that you reconnect to a server ever before it gives up and drops you down to the "Use /SERVER to connect to a server" error. This has not been well tested, so your milage may vary. *** News 09/28/98 -- New flag to /xecho, -x This flag allows you to output something with all highlight attributes preserved, no attributes are honored. Note that if you repaint the screen, these highlights will probably magically go away. ;-) This is NOT a bug, so its not as useful as it might appear. *** News 09/28/98 -- New /on, /on switch_windows This is hooked whenever the client changes what it thinks your "current" window is in any context: $0 The old screen number $1 The old window refnum $2 The new screen number $3 The new window refnum Note that the window might change through forces other than the 'SWITCH_WINDOWS' keybinding. You can have a pretty good idea when this happens because $0 and $2 will be different. *** News 09/28/98 -- New built in keybinding, /bind refresh_status This just updates all your status lines, and nothing else. *** News 09/28/98 -- You may now 'return' out of /fe, /do, /for, etc This was not supported before. Probably a bug. *** News 09/28/98 -- New set, /set mangle_logfiles You may now mangle the output that is destined to your logfiles by /set'ting this variable appropriately. It uses the same syntax as /set mangle_inbound and friends. *** News 09/28/98 -- You may now strip ALL_OFF in $stripcrap() Just specify ALL_OFF as one of the items in the first argument. *** News 09/28/98 -- Support for bzip2 Scripts, help files, and other files that are loaded by the client may now be in .bz2 format as long as 'bunzip2' is available somewhere in your PATH. *** News 09/28/98 -- New built in expando, $'' Yea yea, i know i havent documented anything in a long time, so here is a bunch all together. This new expando is just like $"", except that it only waits for the user to press one key before it returns. BTW, $"" and $'' now use /input and /input_char as their underlying infrastructure, but put a synchronous wrapper on top of it, so it is now safe to mix the two input types (such as it is.) *** News 08/03/98 -- New /on, /ON SWITCH_CHANNELS This is now hooked whenever any of your windows has its current channel set. This includes the transitions from channel 0 to a new channel (when you /join) and from an old channel to channel 0 (when you /part), and when you do a SWITCH_CHANNELS keybinding. If one of the channels involved is channel 0, then "0" will be the channel specified. $0 - The window that the change is happening in *** You should not assume that this window is the current window! *** $1 - The old channel $2 - The new channel *** News 07/13/98 -- New stuff for stripping crap out of text Due to the incessant requests, ive given in and written a general purpose tool for stripping just about any kind of crap out of text. The tool is used in two ways: Two new /set's that control just what (if anything) the client will strip out of incoming and outbound lines to the *server*, and a new built in function that allows you to scour arbitrary text in arbitrary ways. Lets get on to the gory details: This is the syntax for describing to the client just how to mangle: ALL - Strip all of the below, except ESCAPE ANSI - Convert all ANSI to logical characters, and remove all "unsafe" ansi codes. This does just what $stripansicodes() does. Note that to remove any of the attributes below, you need to also specify ANSI so that any ansi-sequence will be converted to their logical characters to get stripped. If you dont specify ANSI, all ansi codes will be left untouched! BOLD - Remove all bold_toggle chars. COLOR - Remove all ^C color sequences. REVERSE - Remove all reverse_toggle chars. UNDERLINE - Remove all underline_toggle chars. BLINK - Remove all blink_toggle (flashing) chars ROM_CHAR - Remove all rom_char characters ND_SPACE - Remove all non-descructive spaces ESCAPE - This is a special one. If you specify ESCAPE, then any ESC characters will be converted to [. This will defeat your ability to do ANSI, as there wont actually be any ansi sequences left! ;-) You may specify any number of these modifiers by seperating them with commas. For example, "BLINK,UNDERLINE" means to remove both blink and underline characters. You can negate the sense of an attribute by prepending it with a hypen. So "ALL,-REVERSE" removes all the above attributes EXCEPT that it wont remove reverse chars. And now how to use this: /set mangle_inbound This will mangle all inbound SERVER text in accordance with the description rules (as specified above). /set mangle_outbound This will mangle all outbound SERVER text in accordance with the description rules (as specified above). $stripcrap("" text) This will mangle the given text in accordance with the specified description (as specified above). *** Note that in general, using this feature is *very* expensive. *** News 06/15/98 -- /TOPIC command extended to now unset topics You can now unset the channels topic by prefixing the channel name with a hyphen *and not specifying any arguments*. That is to say, '/topic -#umbrella' will unset the topic (if any) from the channel #umbrella. You can do '/topic -' to unset the topic from the current window's channel. *** News 06/10/98 -- EPIC now under the BSD license As ircII-current (post 4.4) has been changed to the BSD style license and ive been informed that permission has been given to retroactively offer the license to previous versions (eg, 2.8.2), I'm very happy to release EPIC under the BSD style license. See doc/Copyright for the specifics. *** News 05/28/98 -- /on connect now passes in three arguments /on connect now offers the server's idea of what its name is as $2. This may very well differ from what we think its name is supposed to be. *** News 05/29/98 -- New built in functions $iget[r]matches() (Crackbaby) This works just like $getmatches(), but it returns the index number (in alphabetic order) of the array members rather than the item numbers (in the order they were put into the array.) The first argument is the array and the second argument is the pattern. $igetrmatches() is to $getrmatches() what $igetmatches() is to $getmatches(). Got it? *** News 05/29/98 -- New /on, /ON SEND_CTCP When you send a CTCP request or a CTCP reply, this on will be hooked. The arguments are: $0 - "PRIVMSG" for requests, "NOTICE" for replies $1 - Who the CTCP is being sent to $2 - The type of CTCP being sent $3- - (Optional) Argument(s) to the CTCP being sent *** News 05/29/98 -- New built in function $servnum() You give it a server name, it returns a server refnum for that server. Returns -1 if the server isnt valid. *** News 05/29/98 -- New type to /xdebug, "ALL" If you specify "ALL" to /xdebug, it will turn on all the xdebug options (as if you had specified the -x command line argument). Using "-ALL" will turn off all xdebug options. *** News 05/29/98 -- New flag to /who, -u-i This flag will direct the client to add the 'x' argument to the WHO protocol command, which is used by the undernet ircd servers to give you invisible users. (They changed it so that operators only see visible users now unless they use this special flag, so that the server can whine to everyone else about how youre abusing your power.) Don't use this server in any other situation, as itll probably confuse the server or something. *** News 05/29/98 -- $isconnected() no longer requires an argument If you dont specify an argument, 'from_server' is the default *** News 05/29/98 -- /on dcc_connect compatability with BitchX /on dcc_connect will hook with $1 being "SEND" first, and if you dont grab that, it will offer the same exact thing with $1 being "GET". This is for compatability with bitchx. *** News 04/24/98 -- New built in command line argument (Texaco) The -s command line flag is now honored, and it instructs the client to not attempt to connect to a server on startup, but instead show you your server list (so you can /server to one) *** News 04/24/98 -- New built in function $gettmatch() (Colten) Im not exactly sure what it does. Someone tell me please? =) *** News 04/24/98 -- New noise operator for /on, /on ?type This is kind of hard to explain, but here goes. You may now specify an /on as having noisy type '?' (a question mark). If you use this type, the /on will be executed silently (as if you had used /on ^type) but whether or not the /on actually supresses the default action will be determined by you at runtime. You are expected to /return a value from the body of the /on. If you return 1, the default action *will* be suppressed. If you return 0, the default action *will not* be suppressed. *** News 04/18/98 -- **hack** /on set "set-error *" is hooked by /set Whenever the user does something that would cause the /set command to emit an error, such as /set booya, where booya is not a valid built in /set, you can hook /on set "set-error *" to suppress or redefine the error message. *** News 04/18/98 -- /bind'ings also follow your /package settings So if you /unload package, then it will unload any /bind's that were set in that package. *** News 04/18/98 -- /on 433, /on 437, /on 438 now pass server as $0 These are the "nick collision" numerics, and now the server that rejected you is passed as $0. I have cleared this change with Pana, so BitchX will do this as well shortly. *** News 04/18/98 -- New built in function $getsets() If given an argument, it will return all the built in /set values that are matched by the argument(s). If no arguments are given, it will return all built in /set values. *** News 04/18/98 -- Client automatically sends DCC REJECT when you exit The client will automatically send CTCP DCC REJECTs on your behalf whenever you close or abort a DCC conenction. This also will happen when you /exit. This is so the remote peer will know that you will not be getting the transfer, and if theyre an EPIC or BitchX client, they will automatically close it for their end as well. *** News 04/18/98 -- New /set, /SET SCROLLBACK_RATIO You may now specify, in percentage points, how much of the screen you want to scroll by every time you scroll forward or backward. This value should be between 10 and 100, as the client silently truncates it to those extremes if you dont. *** News 04/18/98 -- /DCC GET nick * now works You may specify a star as as special indication that you want to get all of the files that have been offered by "nick". *** News 04/18/98 -- New set, /SET DCC_AUTO_TIMEOUT (autoclose old dcc reqs) If at least N number of seconds has passed (where N is the value of this set) since you offered or were offered a DCC handshake, without the connection being accepted by either side, the client will automatically close the offer on your behalf. *** News 04/18/98 -- Doing /DCC SEND nick file wont emit error second time Rather than emitting an unhelpful error message the second time you try to /DCC SEND to someone (perhaps because the first time you did the send the person wasnt on), duplicate /DCC SEND requests will now send a "booster" message identical to the original. (This works for /dcc chat nick as well) *** News 04/18/98 -- /DCC RENAME can now rename chat connections To rename a chat connection, specify the original nickname as '-chat'. Then specify the old nick and the new nick. Something like this: /dcc rename -chat oldnick newnick *** News 04/18/98 -- DCC sliding window (/set dcc_sliding_window) modified You may now set this to any value, no matter how abusrdly large, and the client will keep up to this many packets outstanding, but never so many that the client will block. Previously, if you set this value too high, the client would block. Now it is safe to set this to 10,000, and acheive pretty good throughput. *** News 04/18/98 -- New /dcc command, /dcc closeall This closes all of your registered DCC connections, leaving your DCC list very empty. *** News 04/18/98 -- Windows may now have zero visible lines You may now do /window size 0 to make a window that is nothing but a status bar. *** News 04/18/98 -- New /set, /SET ND_SPACE_MAX For those who want to cap the number of non-destructive spaces that may appear in any one line of output, you may set this variable to control the number the client will parse before ignoring them. The idea is simliar to /set tab_max *** News 04/18/98 -- New flag to /xecho If you use the double-hyphen flag to /xecho, it will stop all argument parsing right there and take the rest of the arguments as the text to be echoed. This is useful if the first word you want to output starts with a hyphen /xecho -- -s booya booya booya boo outputs -s booys booys booys boo *** News 04/18/98 -- New flags to /lastlog There is a new flag to /lastlog, -all which specifies that the given lastlog level to search for is to be all qualifying levels. You can turn off a given level by using a double hyphen (ala --msgs). So, if you want to see everything in your lastlog EXCEPT your msgs, do this: /lastlog -all --msgs Another new flag is -reverse. The -reverse flag instructs the client to start from the END of your lastlog and go BACKWARDS through the lastlog when outputting. *** News 04/02/98 -- New command, /userip This is the front end to the Undernet command by the same name. It is exactly like /userhost except it returns the ip address instead of the named userhost. *** News 04/02/98 -- New command, /usleep The /usleep command pauses the client for some number of microseconds. specified as the argument to the command. This command will probably be rolled into /sleep at some future time, Watch for this. *** News 04/02/98 -- $cparse() changed to support bitchx-syntax If the first argument passed to $cparse() is an extended word, then only the first argument will be used for the output, and any numeric expandoes in the first argument will be expanded with the rest of the arguments to $cparse() -- ala: $cparse("This is a $0 test" cparse) *** News 04/02/98 -- /window create now works properly for GNU screen Kanan did the work for this, you can thank him. ;-) *** News 04/02/98 -- You may now /msg a DCC RAW connection. To send a message to a DCC RAW connection, simply msg to =NUM where NUM is the number that was previously returned by $connect(). Obviously, you can also /query a DCC RAW connection with this, making it usable for protocol connections to remote servers. I have fixed and returned the 'mudirc' script, which demonstrates how to make epic act as a relatively useful mud/moo client. *** News 03/24/98 -- Scope resolution operator for variables The client now supports a way to differentiate between local variables and global variables having the same name. As always, an expando with no modification will resolve to a local variable if it can, and a global variable it cannot. However, if the variable name is prefixed with a single colon (either as an lval OR as an rval), then the variable will be expanded *only* as a local variable, and if the local variable does not exist, it will expand to the false value. If the variable name is prefixed with two colons (again, either as an lval or an rval), the variable will be expanded *only* as a global variable, even if a local variable by that name exists. Here are some examples: assign foo 1 local foo 2 @ ::foo = 4 # Sets the GLOBAL variable @ :foo = 6 # Sets the LOCAL variable @ foo = 8 # Sets the LOCAL variable @ bar = 12 # Sets the GLOBAL variable $::foo # is '4' $:bar # is the false value $bar # is 12 $foo # is 8 *** News 03/24/98 -- New /on, /ON UNLOAD As a courtesy to script writers that use /package in order to keep track of all of the aliases and so forth that they create in their scripts, /ON UNLOAD will be hooked with the package name (as supplied to /package) when the user does /unload . Presumably, you could use this to close open logfiles or $connect()s or what ever garbage collection that is needed. *** News 03/24/98 -- Built in function $tdiff() enhanced (as a demo) To demonstrate the proof of concept, the $tdiff() function has been expanded to support decimals. For example: $tdiff(60.01) returns "1 minute 0.01 seconds" If you like this support and want to see it applied to the other $tdiff*() functions, let me know. *** News 03/24/98 -- New /set, /SET MIRC_BROKEN_DCC_RESUME Unfortunately, due to popular demand, i have broken my previous promise to never #define MIRC_BROKEN_DCC_RESUME, a feature which breaks both the spirit and the letter of RFC 1459. As a comprimise, the ability to use this feature is controlled through a new set by the same name, /SET MIRC_BROKEN_DCC_RESUME which will now and forever default to OFF. (Since /set's can be changed by a script, there will not ever be a need for me to change this default to ON.) I stand by my previous statement that any script that uses this feature is broken and you should pester the script author to take it out. *** News 03/24/98 -- /ON DCC_OFFER extended If you offer a dcc send to another user, then /on dcc_offer will hook with additional arguments: $2 - filename being offered $3 - size of the file being offered *** News 03/24/98 -- Built in function $isnumber() changed You may now specify a base argument, prepended with a 'b'. For example, to determine if '014' is a number in base 6, $isnumber(014 b6) or $isnumber(b6 014) It makes no difference whether the base is the first or the second argument: but you must put a 'b' before it either way. Bases 0 through 36 are supported. Base 0 (the default) is a special base that attempts to auto-grok the argument for its base (see the man page on strtol(3)) *** News 03/24/98 -- New built in function $rest(start text) (Matt) This function works like $restw(), but it works on strings. It returns 'text' beginning at the 'start'th character *** News 03/24/98 -- /bind metaX now shows all of the meta-X bindings If you do something, like say, /bind meta1, then the client will show you all the bindings you have that start with meta1. *** News 03/24/98 -- The slash (/) always recognized as a command char As a consideration to scripters, the client will always accept the slash as a command character, even if /set command_chars does not include it. You may then safely and with a free conscience do //built_in_command without having to lie awake at night worrying that someone would take away the slash from you. *** News 03/06/98 -- Add or delete specific levels from /window level You may now add or delete levels from your existing /window level by prepending the level(s) with a plus ('+') for addition and a minus ('-') for subtraction. For example: /window level all -- sets the window level /window level -crap -- removes JUST crap level /window level +crap -- adds crap level back. *** News 03/04/98 -- You may now use "special chars" in your input prompt Previously, you could use ansi sequences to turn on bold and so forth in your input prompt. Now you may use ircII's "special chars" to turn them on as well (like ^B, ^C, etc). The flipside of this is that you may only use "safe" ansi codes, if you use them at all, since unsafe ansi codes will be stripped out by the client. This is intended to be a feature, not a bug. *** News 03/04/98 -- New character for $info(o) If the return value from $info(o) includes the character 'm', then you know that you should /set color instead of /set control_color_c. This can be used in conjunction with the next note... *** News 03/04/98 -- IMPORTANT! /SET CONTROL_C_COLOR RENAMED TO /SET COLOR It is important to note this change. If you have /set control_c_color in your script, you should do one of two things to work around this: 1) Use a compatability /set for older epic4pre1.* clients: /on ^set "COLOR *" set control_c_color $1 2) OR use a compatability /set for newer epic4pre1.* clients: /on ^set "CONTROL_C_COLOR *" set color $1 *** News 03/03/98 -- Correct support for "nondestructive spaces". You may now use the ^S special char as a "non destructive space". This is emitted by the ansi parser when you do the ^[[C code. The general idea of a nd space is that any color/highlight/etc that is active *will not* be output for the space (it is left totaly blank of all attributes) *** News 03/02/98 -- New flag to /input, /input -noecho If you want to input a password, or some other sensitive information, you may use the -noecho flag to /input to suppress the echoing of the characters as they are typed. *** News 03/02/98 -- Ten new /set status_user(10-19) supported. You may now do /set status_user10 through /set status_user19. They will show up on your status bar via the %{1}0 through %{1}9 expandoes. See below for explanation of how %{N}M works. *** News 03/01/98 -- Uppercase user modes supported Now all 26 of the uppercase user modes are supported, along with the 26 lower case modes. Should cause the client not to crash on DALNet and so forth. *** News 02/27/98 -- Semantic changes for status line expandoes. It is now possible (though there is no support for it yet), to specify a "map" for your status line expandos. The general syntax is: %{N}M where 'N' is some number, and 'M' is the expando that you want. Note that for different values of 'N', you will get different values for 'M'. The "default" map is 0. To give you an idea how it works, try using %{0}S and see that it is the same as %S. I have included (for testing purposes) a single expando %T on map #1. Use %{1}T and see that it is *different* than %T is. It is expected that this will allow an effectively unlimited number of status line expandos in the future. *** News 02/27/98 -- New built in function, $isnumber(text) You pass it a number, it tells you if it is a number or not. It correctly handles negative numbers, and hexadecimal/octal. More or less all it does is call strtol(input, NULL, 0). See the man page for strtol to see how that works. *** News 02/27/98 -- Four new mask types for $mask(). There are now four new types of masks for $mask(): N Z is a hostname Z is an ip address ------------------------------------------------------------------- 10 *!*@h.d *!*@d.* 11 *!*u@h.d *!*u@d.* 12 n!*@h.d n!*@d.* 13 n!*u@h.d n!*u@d.* With the following modifications: In the ``local'' portion of the hostname, all sequence of numbers are substituted with a single '*'. That is to say, $mask(10 nick!user@ppp-147-0-52-129.frobitz.com) returns *!*@ppp-*-*-*-*.frobitz.com *** News 02/22/98 -- New built in function, $stripansicodes(text) This function will "normalize" the text, suitable for displaying. Generally, "normalization" has two aspects. The first aspect is that if DISPLAY_ANSI is ON, then all ansi codes are either converted into logical codes (^C sequences, or ^B, or ^_, etc), or they are stripped out entirely. If DISPLAY_ANSI is OFF, then just the escape is mangled, and the rest is left intact. ^C codes are also converted to a form that correctly manages bold and blink attributes. THIS IS THE SAME CODE THAT PREPROCESSES YOUR OUTPUT FOR THE SCREEN. So you can be assured that What You Get Is What Youre Going To See. *** News 02/22/98 -- New built in function, $printlen(text) This function returns the number of _printable characters_ in the text _as it would appear on the screen_. The string you pass must not contain any ansi sequences, as they are interpreted as printable characters. Use $stripansicodes() to remove them. *** News 02/22/98 -- New math operator, ** The ** operator now acts as an exponential operator. All it does is call pow(), so you can specify whatever arguments you want with it. Yes, it correctly handles negative exponants and fractional exponants, as long as your math library does! *** News 02/22/98 -- New built in function $remws(lhs / rhs) This function returns all of the words on the rhs of the the /, except that any words that appear on the lhs of the / have been removed first. *** News 02/22/98 -- New built in function, $pad(len char string) This allows you to pad a string out to a certain length with a specified character. If the string is too long, it is NOT truncated (as opposed to $[x]y). *** News 02/18/98 -- Twenty new meta maps Yep. Now there are thirty nine of them. META1-META39. META4 is still, as always, sticky. *** News 02/18/98 -- New built in function, $channel() This returns some information about who is on your channel. It returns a sorted list of nicknames prepended by two characters. The first character is a '@' if the person is a channel operator, and '.' if they are not. The second character is '+' if the person is a channel voice, and '.' if they are not, and '?' if we're not sure either way. *** News 02/16/98 -- New built in function, $iscurchan() This takes a channel argument, and will return '1' if the specified channel is the current channel for *any* window that is bound to the current server. It returns 0 otherwise. This is intended to allow for more flexibility for testing for current channels in /ON's. EG: Rather than: /on ^send_public * {if ([$0] == C) {...} {...}} Try doing: /on ^send_public * {if (iscurchan($0)) {....} {...}} This will allow you to do the "right thing" even when $0 is not the current channel for the current window. *** News 02/14/98 -- New built in functions: $getuid(), $getgid(), $getpgrp() As well as $getlogin(). These correspond to the system calls by the same name. Do a lookup on the man page for information on what they return. *** News 02/14/98 -- Changes to how ansi codes are handled IF YOU HAVE /SET DISPLAY_ANSI ON: New code contributed by fireclown now eradicates all ansi codes from the output before it is counted and displayed. Any codes that are recongized and are "safe" (such as ^[[m, where is one of the color codes, or bold/blink/reverse/underline), are converted to the corresponding logical character. All other codes are blown away entirely. Not just the escape, but the whole thing (at least as much as we can recognize it.) IF YOU HAVE /SET DISPLAY_ANSI OFF: Just like before, the escape is mangled into reverse, and the rest of the string is untouched. Also, since all ansi color codes are converted to ^C codes, then if you /set control_c_color OFF, all color will be inhibited. Conversely, if you /set control_c_color ON, all color will be honored. IT NO LONGER IS RELEVANT WHAT YOUR /SET DISPLAY_ANSI VALUE IS TO DETERMINE HOW YOU SEE COLORS! *** News 02/14/98 -- New ^C codes The Control-C Color codes from 00 to 15 are now in "mirc" order (which is also used by BitchX). This has been changed to make it easier on scripts that want to be BitchX/EPIC compatable. The ANSI order codes have been moved to: 30 - 37 Ansi Foreground colors 40 - 47 Ansi Background colors 50 - 57 Emphasized fg/bg colors Note that 30-37,40-47 corresponds directly to the ^[[m codes and that 50-57 is either the BOLDED colors of 30-37, or the BLINKING colors from 40-47, depending on whether or not it is on the lhs or the rhs of the color code. *** News 02/14/98 -- Two new debugging flags to /who /WHO -d (diagnose) will show the contents of the who queue for the server for your current window /WHO -f (flush) will remove all the entries of the who queue for the server for your current window. You must *NEVER* do this while a WHO request is still pending, or the client will fall over. If you report this as a bug, i will laugh at you. *** News 02/14/98 -- New built in function, $rigtype() You give it some number of ignore levels, it will give you all of the patterns (exact patterns) that match *only* those levels (no more, no less.) Dont ask, this is what was requested. ;-) *** News 02/14/98 -- New built in function, $igtype() You give it one of your ignore patterns (must be EXACTLY the same. This is not for use as a matcher. Use $rigmask() for that) and it will give you the IGNOREd levels on that pattern. *** News 02/14/98 -- New built in function, $winlevel() You give it a window description (name or refnum) and it gives you the lastlog levels that are bound to that window. Simple, aint it? *** News 02/14/98 -- New /set, /SET HIGH_BIT_ESCAPE (0 | 1 | 2) This controls the behavior of how the client handles 8 bit characters. If this is set to 0, the eighth bit, if any, is always stripped to yeild a 7-bit ascii value. If this is set to 1, then if the 'km' termcap variable is set (hint: it almost always is), then the eight bit character -X will be converted into a -X sequence. If this is set to 2, then the client will leave the character alone and parse it as a normal 8 bit character. *** News 02/14/98 -- New /on, /ON SERVER_LOST This is (hopefully) hooked any time youre disconnected from any server for any reason. *** News 02/14/98 -- Variable modifier : (a colon) implicitly declares local You may now *** as an lvalue *** prepend the variable name with a colon to impliclity declare it as a local variable. You must not use the colon in any rvalue context, or in the /fe or /foreach commands, as the variable is already declared local there. You need only use the colon once. Any future references will automatically use the local variable because it will have been declared that way. *** News 02/14/98 -- New flag to /xecho, /xecho -s /xecho -s attempts to emulate the internal "say()" function, and promises not to output anything if you have run the command with the ^ modifier to suppress any output. (Normally, all /xecho's always are output, even if you did ^cmd to supress output) *** News 02/14/98 -- New status line expando, %. (percent-dot) This outputs the current contents of whatever was set with the /window status_special command (see below) *** News 02/14/98 -- New /window command, /WINDOW STATUS_SPEICAL This /window command sets some window-specific information that you would like to see displayed on your status bar. It will be displayed in the status bar using the %. expando (thats a dot) *** News 02/14/98 -- New built in function, $chop(num text) This function returns "text" with the LAST "num" characters removed. If "num" is negative, nothing happens. *** News 02/14/98 -- /set status_user<3-9> changed They now go to your current window rather than to a NON current window. I did this because it seemed everyone wanted it that way. *** News 02/14/98 -- New set, /set current_window_level This set will allow you to specify some number of levels as always going to the current window *if and only if* the current window is attached to the same server as the output to that level. Otherwise, it would go to the "normal" window. This is useful for people who want informational stuff to always go to a visible window, so they may choose to do /set current_window_level CRAP *** News 02/14/98 -- $mychannels() can take an argument If the argument is a number, then it is taken as a server refnum that youre interested in. If it is not a number, then it is taken as a window name that youre interested in. But wait! There's more. If you must have a need to specify a window refnum instead of a name, you can prefix it with the '#' character and thatll work too. *** News 02/14/98 -- Documentation updated Youll notice this file is way behind the work ive done. So today im gong to go through and update all the stuff ive done since the last time i documented it (2 and a half months). They all have todays date, but theyve been done at various times recently. *** News 12/29/97 -- New built in function $ischanvoice(nick #channel) This function returns one of three values depending on the current +v status of the given nick on the given channel. 0 -- The person is not +v 1 -- The person is +v -1 -- I dont know *** News 12/19/97 -- New built in function $mask(type address) Returns a pattern suitable for /ignore'ing or banning. If 'type' is N, and the address is Z (either n!u@h.d, or n!u@d.h, where the former is a host.domain and the latter is an ip address), then the return value is: N Z is a hostname Z is an ip address ------------------------------------------------------------------- 0 *!u@h.d *!u@d.h 1 *!*u@h.d *!*u@d.h 2 *!*@h.d *!*@d.h 3 *!*u@*.d *!*u@d.* 4 *!*@*.d *!*@d.* 5 n!u@h.d n!u@d.h 6 n!*u@h.d n!*u@d.h 7 n!*@h.d n!*@d.h 8 n!*u@*.d n!*u@d.* 9 n!*@*.d n!*@d.* *** News 12/19/97 -- Changes to $winchan() and $chanwin(), now synonyms Since there is no compelling reason to make a distinction between $winchan() and $chanwin(), and since the specific distinction that was made caused no end of problems for both me and scripters, the two troubled functions are now synonyms of each other. If you pass it a channel, it will return a window refnum. If you pass in anything that isnt a channel, it will be considered a window refnum or name, and the current channel of that window will be returned. *** News 12/19/97 -- New built in function $winrefs() This returns the refnums of every currently open window, both hidden and invisible. While the order of the refnums is *EXPLICITLY* undefined, it follows in traverse_all_windows() order, which usually returns windows in physical order on their screens, and the invisibile windows are last. You may NOT assume this, though. ;-) *** News 12/19/97 -- New built in function $querywin(target) Given a query target, this returns a window that has that target as its current query. If more than one window has the specified target as its query, which window is returned is indeterminite. *** News 12/19/97 -- New built in function $uname(description string) This returns the entire argument string as-is except with the following modifications, as retreived from the uname(2) system call. Any instance of will be replaced with --------------------------------------------------------------------- %m The "machine" (architecture) %n The "Node" (hostname) %r The "Release" of the operating system %s The "Name" of the operating system %v The "Version" of the operating system %a The logical value of "%s %n %r %v %m" %% A single % *** News 12/19/97 -- New built in pattern matcher A new pattern matcher has been written. It is expected to be bug-for-bug compatable with the old pattern matcher. If you see any discrepencies, no matter how obscure, please let me know. The reason for the new matcher is that it uses an iterative algorithm rather than a recursive algorithm, and so is expected to be faster. *** News 12/19/97 -- New built in commands, /PACKAGE and /UNLOAD The /PACKAGE command allows you to "group" all of the assigns, aliases, and ons (and stubs) in a script under a common package name. When you use the /package command, any alias/assigns/on that are registered until the end of the file are given the current package name. You can change the package name anywhere in a script, even if you have previously used /package. However, packages only last until the end of the file -- they never propogate upwards. Scripts that are loaded by other scripts may put themselves under a different package name than the one being used by the loading script. By default, a script is put into the package that is currently active in the script that loaded it (or * if no package is active) The idea of a logical grouping is useful for the purposes of removing the entire package later. So the /unload command allows you to remove a package that was constructed as above. The idea behind all this is to allow a script, and anything that it loads, to be easily removed whenever you want. By simply putting a /package command at the top of a script, then you can later do /unload and everything that was loaded in that original script will be removed. As these commands will surely be used in the future in ways that are not really easy to describe now, you should be careful to not pass more than one argument to /package or /unload. Even though multiple arguments may be recognized now, for forwards compatability, you should not get in the habit of doing that. *** News 12/19/97 -- New built in function $cparse(text) The $cparse() function returns the given text without modifications except for the following exceptions: Any instance of will be replaced with ^C codes to change the text to text to background to --------------------------------------------------------------------- %k %K %0 black bold black black %r %R %1 red bold red red %g %G %2 green bold green green %y %Y %3 yellow bold yellow yellow %b %B %4 blue bold blue blue %m %M %5 magenta bold magenta magenta %p %P magenta (think: purple) %c %C %6 cyan bold cyan cyan %w %W %7 white bold white white %F Flashing attribute turned on %n All colors turned off %N Don't put a clear-color tag at the of output %% A single % Of course, you need to have /set control_c_color on to see the colors, so this is an easy way for a script to be color-aware while not forcibly imposing colors on an unwilling user. ;-) *** News 12/19/97 -- Built in functios $winnum() and $winnam() extended They can now take a window description (eg, a window name or a window refnum) as an optional argument, and will return the info for that window, if it exists. As always, with no arguments it still defaults to the current window. *** News 12/18/97 -- New /window command, /WINDOW QUERY This allows you to set the query nicknames for any window that you can specify. The /query command now uses it. *** News 12/18/97 -- New attribute, Blinking This is a new character attribute, just like underline and bold and reverse. Not all terminal emulations will support it, but the linux and freebsd consoles do. By default, the blink key is ^F (think of flashing), and you can input that by /bind'ing something to BLINK. You can turn it off with /set blink_video off *** News 12/16/97 -- New script: "man" After you do /load man, you will have available a "man" alias that will search all of the subdirectores if the man-style help pages for the topic youre looking for. It handles multiple sections ok. Try /man away to get an idea. *** News 12/16/97 -- New argument passed to /on join. A fourth argument is now passed to /on join. Here is a summary of the the arguments to /on join. $0 Nickname of who joined $1 Channel that was joined $2 Userhost of who joined $3 Zero more of the strings (+o) or (+v) (only on avalon 2.9 servers) -- (+o), if present, is always $3. -- (+v) can be either $3 or $4. *** News 12/16/97 -- New argument to /help, -WAIT If you do /help -wait, then it will not return until the help system has finished whatever its doing. If the user is not currently doing /help, it will return immediately. *** News 12/16/97 -- New argument to /xecho, -NOLOG The -NOLOG argument to /xecho inhibits the current output line from being logged, either at the /set log level or the /window log level. Im not sure why you would want to do this, but Kasi asked for it. *** News 12/15/97 -- New built in function, $leftpc() This function returns the LONGEST string of "text" that contains "N" printable characters, where "N" is the first argument to the function and everything else is text. For example: $leftpc(10 onetwothre$chr(27)[34mefour) return onetwothree Note that any non-printable characters that appear after the N'th character *will* be included in the output. This is intentional. *** News 12/11/97 -- New built in function, $rigmask() This works just like $igmask, but in reverse. You provide it a nick!user@host pattern, and it returns to you all the ignores that would be triggered by that pattern. *** News 12/05/97 -- Ten new meta keybindings, META10 through META19 You now have 19 meta keys to work with. The client attempts as much as possible to conserve space, so this isnt a RAM buster. If you dont use the new meta maps, the only space reserved for them will be a NULL pointer. ;-) Meta4 is still sticky. *** News 12/03/97 -- New flood protection, change to /ON FLOOD On flood now takes one more argument: $0 The person doing the flood $1 The type of flood theyre doing $2 The channel (if any) theyre flooding on (NEW!) $3- The text of the flood. *** News 12/02/97 -- New flags to /CLEAR and /UNCLEAR They are -HIDDEN which clears or unclears all the hidden windows, and -VISIBLE for all of the visible windows. Theyre mutually exclusive. The last one used prevails. Use -ALL if you want all windows to be adjusted. *** News 12/01/97 -- New built in command, /UNCLEAR This command works just like /CLEAR, except it nails the bottom of your scrollback display onto the bottom of the screen (or as low as possible if you dont have a full screen of display yet) *** News 12/01/97 -- New built in function, $msar() This is a "multiply substituting" $sar(). You give it any number of delimited patterns, and it will substitute all of the patterns on the text. Of course, the obvious limitation is that the text may not contain the delimiter character. *** News 11/27/97 -- New built in function, $randread() (srfrog) Given a filename, this returns a random line from that file. Yes, it does ~ completion... *** News 11/25/97 -- New built in function, $igmask() You give it a pattern, it returns all of the ignore patterns that are matched by the pattern. *** News 11/20/97 -- New flag to /timer, -WINDOW This flag will allow you to specify that the timer should go off in the specified window. Please note that the limiations about timers that go off in hidden windows still applies. Use this flag with caution until the problem with timers in hidden windows is addressed. *** News 11/20/97 -- Changes to /dcc close You may now use the words "-all" or "*" to indicate that all of the dcc's of a given type or dcc's to a given nick should be closed. For example: To close all of the dcc's you have open to "foobar", /dcc close * foobar To close all of the dcc chat's you have open to anyone, /dcc close chat * *** News 11/19/97 -- New built in function, $count() This function returns the number of times (possibly overlapping) that a given string appears in some text. For example: $count(. one.two.three) returns 2. $count(ll llll) returns 3 (think about it). *** News 11/12/97 -- New /ON, /ON DCC_OFFER This hook is activated whenever you make an OUTBOUND DCC OFFER. (Kind of the complement to /on dcc_request). Presently, it has exactly two arguments: $0 is the person to whom you are offering the dcc, $1 is the type of dcc you are offering. It is possible that more args could be added in the future on request. *** News 11/11/97 -- New /SET, /SET STATUS_TRUNCATE_RHS **** RECALLED ***** This set determines which side of the %> in your status bar should be truncated if the status bar is wider than the screen. If this is set to ON, then the right hand side of the %> will be truncated back to 80 characters. If this is set to OFF, then the left hand side of the %> will be truncated so as to allow everything to the right of %> to be kept. ***** This feature is non-operative due to some ***** ***** serious problems. It will remain ***** ***** non-operative until such time it is fixed ***** *** News 11/10/97 -- New script, "pipe" This script implements the $pipe() function, which demonstrates how you can use /on exec to capture the stdout of an exec'd command and return it from a function (essentially acting as a pipe or a backtick type operation). It may not be universally useful as-is. Feel free to tweak it to your taste. *** News 11/07/97 -- Improvements to /ON As part of a larger re-organization of the /on command, three noticible changes to the semantics of /ON have been made: 1) The @ and # "server-specific" qualifiers have been withdrawn. If you used this feature, and desperately need to retain it, let me know and ill work something out with you. I did not reimplement them on the understanding that nobody would miss them. 2) Doing /on ^type ^"nick" now works as you would expect, that is to say, it really does nothing, and it would suppress the default behavior. This is a lower-cost way to do /on ^type "nick" #. 3) You may now do /ON SEND ("send" is just an exmaple, this works for any hook) to see all of the hooks for types that begin with "send". Previously, it was impossible to get a listing of more than one hook type at a time. *** News 11/05/97 -- Improvements to /TIMER /TIMER now attempts to keep track of what the current server and current window were when the timer was registered, and will revert back to that window/server when the timer expires. This should prove to be much more intuitive. *** News 10/28/97 -- New flag to /xecho, /XECHO -R This flag dumps a raw string to your terminal emulator. It is imperative to notice that the client does *no interpretation* of the string. It is dumped right to your terminal by the /xecho command, so it never gets backed by your window/screen. That means you should really only use this to output strings that act as a state-change command to your terminal (eg, setting the xterm title bar, or doing an unflash.) If you output "modifying" codes (like setting colors or attributes), it wont get to your window display and will be lost on the next window redraw. *** News 10/27/97 -- New /set, /SET NO_FAIL_DISCONNECT (ON|OFF) (nuke) When this is set to ON, the client will NOT automatically terminate your connection to the server if a write() fails. This is most useful for nuke and other people who have static ip's connected to routers that retain packets while you are disconnected. The default is OFF, since for most people, a write() failure is a fatal condition. *** News 10/26/97 -- New built in commands, "break", "continue", "return" These built in commands are used for controlling the flow of code execution. They work 99% like they would in C. When youre in a "while" or "for" loop, the "continue" command will immediately terminate the current loop and go back to the top (the 'for' command will run the 'iteration' part as it does in C). When you do a "break" command in "while" or "for", it immediately terminates the loop entirely and moves to the next command after the "while" or "for". The "return" command is used to immediately terminate execution of an alias or on-event. If an argument is specified, it is assigned to the local variable FUNCTION_RETURN. Those of you who use the old "return" alias that just assigns to function_return will find that it still works, but it wont terminate the execution of the current alias or on (eg, you wont notice any changes.) Youre encouraged to take advantage of the new functionality. =) *** News 10/26/97 -- "FUNCTION_RETURN" now a normal local variable. When you make a function call, the "function_return" variable is now instantiated as a regular local variable. Previously, the function_return variable was trapped for special treatment and was a write-only value. Now it is a read/write variable, so you can use it just like any other variable. The one exception to this is that you may assign to FUNCTION_RETURN in aliases that are called from the function that instantiated them (as opposed to other local variables which are not honored in called aliases.) This was done out of neccesity to be compatable with scripts that presume that you may assign to FUNCTION_RETURN and it will carry to the closest enclosing function call. Since FUNCTION_RETURN is stored on the calling stack, the arbitrary limit of 128 nested function calls no longer exists. *** News 10/25/97 -- New Status bar expando -- %K This expando will be displayed on the status bar if you are currently in scrollback mode in that window. Should be good for people who forget. ;-) What it actually displays is controlled by a set, /set status_scrollback. The default is "(Scroll)" *** News 10/20/97 -- Greatly reduced CPU usage in pre0.30 Some profiling work showed some really monsterous CPU hogs. With a few minor, yet strategic changes, CPU usage for the testers has been reduced from 60% to 90% compared to pre0.28. (ive seen cpu usage under 2:00 a day for someone on 10 channels running with all usermodes active running clonebot-detection scripts.) *** News 10/20/97 -- New built in functions, $regcomp(), $regmatch(), etc. There are four new built in functions that give you an interface to the posix.2 "regex" pattern matching functionality: $regcomp() given a regex pattern, it will return a printable string representation of the compiled pattern. You must later pass the return value of this function to $regfree() to avoid memory leaks. The pattern is assumed to be case insensitive, and cannot make use of any \(...\) subexpressions. $regexec( ) given a compiled regular expression and some text, it will return 0 if the string is matched by the compiled pattern, or will return nonzero on error. The return code can be passed to $regerror() for specific information. Of note, the return value '1' means the pattern didnt match. $regerror( ) given an error code and the compiled regular expression from which it was generated, this gives you a human readable error message. If the error was from $regcomp(), then you can pass the error code "-1", which will then be subtituted with the last $regcomp() error code. Otherwise, error code should be the return value from $regexec(). $regfree() given a compiled regular expression, this returns any resources that were used by the regular expression. If you fail to $regfree() everything you $regcomp(), then you will expose a memory leak, and that wont be my fault. ;-) You must not use a compiled regular expression after you have called $regfree() on it. To do so will result in chaos. *** News 10/20/97 -- New command line flag, -B This does what the stock client's -b flag does. It loads your .ircrc file right at client startup time rather than waiting for the client to connect to a server. *** News 10/20/97 -- New math operators << and >>. These are the left-bitshift and right-bitshift operators. Currently they are only available in their binary forms. There is no support for <<= and >>=, as support for that would be problematic. Since you can just do the longhand assignment, their ommision is not a big deal. *** News 10/16/97 -- New built in functions, $fnexist(), $cexist() These two functions return 1 if the given built in function, or the given built in command, exist. It returns 0 if they do not exist. The idea use for these is to provide an alias or function that emulates the built in function/command youre looking for, if theyre absent (as in older versions). Of course, this is more of a forward looking feature, as it wont help you on older releases. =) *** News 10/15/97 -- New /set, /SET STATUS_DOES_EXPANDOS (ON|OFF) This /set controls whether or not any expandos (eg, $vars or $func()s) in the status line should be expanded or left alone. Please note that this option is *very expensive*, and so you should not turn it on unless you really do have expandoes in the status_format, and you really shouldnt put expandoes in the status_format if you can possibly get away with it. ;-) *** News 10/15/97 -- New built in function, $currchans(server) If you specify an argument, this function will return quoted words containing a server refnum and a channel name. The channels to be returned are channels that are currently considered to be "current channels" for some window that is connected to the specified server. If you specify a server of -1, then $lastserver() is assumed. If you specify no arguments, then all current channels will be returned. It is expected that this will be useful to determine if a given channel on a given server is a current channel on *any* window. The return value of this function uses double quotes, so it is suitable for use in /fe, or to pass to $rmatch(). Just remember to glob against "* #chan" (with the quotes!) for any server. *** News 10/15/97 -- Change to /window (Colten) If you specify a window refnum where /WINDOW excepts to find a command, then that window will be used as the target window for any further commands, *but*, that window will not be made the current window (as it would if you had used REFNUM ). This is useful for changing an attribute for a specific window but you dont want the current window to change. eg: /window 2 double on *** News 10/15/97 -- Change to $myservers() (Colten) If you pass any argument to $myservers(), then a list of refnums to open servers will be returned. The existing behavior of returning a list of NAMES to open servers is retained if you pass no arguments. *** News 10/15/97 -- New built in function, $isconnected(refnum) (Colten) This function returns 1 if the specified server is currently connected (eg, you have been successfully registered). If refnum is -1, then from_server is assumed. *** News 10/08/97 -- New /window command, /WINDOW SCRATCH (ON|OFF) This allows you to designate a window as being a "scratch" window. A 'scratch' window is one that allows direct addressing, and it does not scroll. The support *just barely works*. That means if you do anything i didnt expect, you probably will crash the client. Let me know if you find any ways to confuse this so i can fix them. To send text to a given line on a scratch window, use /xecho with the -line flag: /xecho -window -line text /XECHO -LINE will whine at you if: * If the window you specify is not a scratch window. * You dont specify -window before you specify -line. * If the line number you specify is out of range for the window. Suggestions/observations: * Scratch windows dont deal with being resized very gracefully. I suggest you do /WINDOW NEW SCRATCH ON FIXED ON so that it cant be resized on you. You should assume (at this time) that if the window gets resized, the contents are *undefined*. That will probably be improved in the future. * Scratch windows probably should not be attached to servers. Use /WINDOW DISCON to make sure they are unbound. * There is NO SCROLLBACK on scratch windows. When you overwrite a line, it is gone forever. * If you "unscratch" a window, then it is implicitly /CLEARed. This to ensure that the status of the window after being returned to normal will be coherent. The previous contents of the window will be retained in the scrollback buffer. * If you do a normal /echo to a scratch window, it will use the line below the most previously output line. When you reach the bottom of the window, it will go back to the top. *** News 10/08/97 -- New /window command, /WINDOW DISCON This allows you to specify that a window is not to be bound to any specified server. That means the window will NEVER recieve output from any qualified server event, unless you specifically use /xecho to redirect output to that window. *** News 10/01/97 -- IMPORTANT! SEMANTIC CHANGES! IMPORTANT! The $winchan() functions and $chanwin() functions have been reversed. That is to say, $winchan() now takes a WINDOW REFNUM argument, and $chanwin() takes a CHANNEL NAME argument. This is the reverse of what it has been before, and the change was done in order to keep the semantics of built in functions coherent (eg, $chan*() functions always take a channel name, and $win*() functions always take a window refnum. A /set has been provided to let you have the old semantics. *** BUT PLEASE MAKE A PLAN TO CONVERT YOUR CODE TO THE *** *** NEW SEMANTICS. PLEASE PLEASE PLEASE. *** To let you know if the new semantics or old semantics are in effect, the new $info command, ``$info(w)'' command will return 1. So add something like this in your script to get compatability: if (info(w) == 1) { set winchan_hack ON } IMPORTANT!!! The value of $info(w) will change to 2 (two) when this hack has been phased out in some future version. *** PROGRAM DEFENSIVELY. *** Plan to do something reasonable if $info(w) returns a value of 2. (This means that the above /set is not available, and the new semantics are irrevokably in place.) I promise that the old semantics will not be irrevokably phased out before EPIC4pre5, and that the old semantics will most likely be phased out at the time of the production release (EPIC4.000) Please plan ahead for this. If all of this ends up being unreasonably complicated or a burden, then let me know, and i'll work something out with you. *** News 10/01/97 -- New /set, /SET WINCHAN_HACK This is a *temporary* feature to help ease the transition for those who have a substantial amount of code that depends on the semantics of $winchan() being "backwards" (eg, that it takes a channel argument rather than a window argument). When this is turned on, $winchan() and $chanwin() will have their "traditional", or "reverse" semantics. When this is turned off, they will have their "modern", or "correct" semantics. THIS SHOULD NEVER BE TURNED ON UNLESS YOU REALLY NEED IT. Please do NOT write new code with the old semantics, it will only encourage the broken semantics. *** News 09/26/97 -- New /on, /ON REDIRECT This hooks any time something is about to be redirected to someone. If you hook this silently, the redirect will be suppressed. This would then be useful to filter out stuff that you might not want to have redirected. $0 - the target to whom the text is about to be sent $1- - the text itself. *** News 09/20/97 -- New function $servernick() You give it a server refnum, it gives you your current nickname on that server. This function has been around a while, it just never got documented. *** News 09/20/97 -- #define CONTROL_C_COLOR now in $info(o) It is represented by the letter 'c'. *** News 09/20/97 -- New built in function $chanwin() This is the reverse of $winchan(). You give it a window refnum or name, and it gives you the current channel (if any) for that window. *** News 09/20/97 -- New built in function, $winnicklist() (Colten) You pass it either a window refnum or a window name, and it returns the nicks that are currently on the "nick list" for that window. (See the help for /window add for info about the nick list). If you dont specify any arguments, the current window is presumed. *** News 09/20/97 -- New /set, /SET NO_CONTROL_LOG (Peter Evans) When this is /set to on, the client will not output any nonprintable, nonspace characters to the log file. When off, it will have the old behavior (dumping everything right to the log as it appears on the screen.) *** News 09/20/97 -- New /on, /ON WINDOW_CREATE When a window is created with /on window, then this new hook will be activated. You may assume that any "window" commands that you specify in the body will work for the window being created. This is intended for setting "defaults" for windows, like so: /on window_create * window double on *** News 09/18/97 -- Comprimise for /SET STATUS_MAIL Because there has been some controversy over the inability to "get rid of that damned colon" for %M in /set status_mail, i have agreed to take it out. However, for those of us who like to have /set mail 1, we wont be left with a "(Mail: )". There is a new script called 'setmail", that traps /set mail, and offers two new /set's, /set mail_format1, and /set mail_format2, for controlling how the mail should look like when /set mail 1 and /set mail 2 is engaged (respectively.) I would just suggest that you load it in your .ircrc (before you /set mail) and see what i mean. *** News 09/18/97 -- New error tracking feature If an error occurs while you are loading a script, then the client will tell you about where the error occured. I say "about", because the client doesnt actually try to run /load'ed commands until it reaches the next valid command, so the command that is in error is always the first one BEFORE the line stated. As well, when you attempt to /assign to an invalid variable, it will tell you what the invalid variable name was, so you can hunt it down. *** News 09/16/97 -- New /set, /SET STATUS_NICK (|Rain|) This is a control for how your nickname will appear in the status bar. Following convention, you may use %N in the /set to determine where the nick should be placed. The default is just %N by itself, which yeilds the traditional behavior. *** News 09/11/97 -- New function $nohighlight() This function will take any arbitrary input and will convert all of the highlight characters (^B, ^V, ^_, ^O, ^C, and ^[) to a "printable" format (in reverse). This allows operators to find hidden attributes in channel names that would otherwise be invisibly stripped. *** News 09/10/97 -- New function, $deuhc() (Peter Evans) This function will remove "*!" or "*!*@" from the front of the specified pattern, if it is present. *** News 09/09/97 -- New /window argument, /WINDOW SKIP (ON|OFF) You may now mark that a window should be 'skipped' when you are moving to the NEXT_WINDOW or PREVIOUS_WINDOW. The only way to "land" on that window then is to use /WINDOW GOTO or such. This was intended to be used for windows that are not to recieve input, such as your OpView window. *** News 09/09/97 -- New command, /SHOOK This is a hokey name, i admit. Anyone got a better name for it? This function allows you to arbitrarily synthesize /on events with your own arguments. This is intended to retro-fit new problems onto old solutions. For example, you could do: /on ^public "% &KILLS Received kill message *" { shook KILL $2- } or something like that, to make your normal /on kill handlers to be executed while youre on an ef2.9 server. Or so is the idea. Let me know what you think of this, and if its broken, say so. **** BE WARNED **** Code in on hooks that depend on side effects (like $userhost() being set) will be *utterly confused* by these synthetic events, and will probably get wildly incorrect results. You yourself are responsible for making sure that this doesnt happen to you! *** News 09/09/97 -- New /window argument, /WINDOW FIXED (ON|OFF) You may now "fix" a window as being a given size. When a window is "fixed", it will never be shrunk or grown when you shrink or grow another window, and it is immune to /window balance. You can still directly shrink or grow a fixed window. The only exception to this is if all windows on a screen are fixed, and the screen is resized, the bottom window of the screen will be forcibly resized, although it would still be "fixed". This was all done so that the OpView window can be set to 4 lines and it will stay that way unless you explicitly change it. *** News 09/09/97 -- New /set, /SET BANNER_EXPAND If this is set to ON, then the contents of /SET BANNER will be expanded ($-substitution will occur) before it is used. If it is OFF, then the value of /SET BANNER is used literally. *** News 09/05/97 -- Changes to how windows are resized When you resize your display, then the proportion of window sizes between the non-fixed windows will be retained. That is to say, if you had two windows, sizes X and 2X, and you change the screen so that the first window has size Y, then the second window will have about size 2Y. When you rebalance your windows (with /window balance), all the nonfixed windows will be set to approx. the same size. Fixed windows will not be touched. *** News 09/05/97 -- Now friendlier with job control If you want to suspend the client but are worried about it pinging out, you should be able 'bg' the client now, and it wont stop due to (tty output) or mangle your screen. You will need to stop the client (with 'kill -STOP %1') before you 'fg' it again, or the client wont accept input. This is not a bug, this is a job control problem. This should satisfy anyone who still pines for 'ircserv' ;-) *** News 09/04/97 -- New /on, /ON DCC_LIST Many people have asked for an easy way to reformat the DCC output. So this new on will output the 8 most interesting capabilities. Im open to adding new ones, just let me know. The 'banner' of the list is output with $0 being "Start" and the rest of the fields being filler. $0 - The type of DCC connection $1 - "1" if encryption is on, "0" if its not (future exp) $2 - Nickname of the peer $3 - Status of connection $4 - $time() when connection established, 0 if not connected. $5 - Size of the file transfer, 0 if not applicable $6 - Number of bytes transfered, 0 if not connected $7 - Description field (usually the full filename) *** News 09/04/97 -- Some new behavior for your display A lot of the code that handles your display has been rewritten. The most important changes are: When you scroll backwards, you will get the lines that actually appeared on your screen, not the lines in your lastlog. Those lines are output at the width they were split for, and if your screen is a different size, they wont be re-split. This is not a bug. Do not report it as a bug. When you are in scroll mode, the screen will not automatically scroll for you if the display reaches the end of the screen. Instead, that stuff is put into the hold buffer. You can use the SCROLL_FORWARD key to go forward a page *even into the hold buffer*, and all new output will appear as long as that output doesnt make the screen scroll. Use the SCROLL_END key to go back to the "normal" scrolling behavior. You cannot turn HOLD_MODE off if youre in scrollback mode. *** News 08/27/97 -- New /set, /SET CLOCK_FORMAT This /set, if set, controls how the client should represent the current time on your status bar, among other things. Rather than have the representation be hardcoded in the client, this will give you the flexiblity to have the time displayed just however you want. By default, this /set comes UNSET. When this is unset, the more traditional behavior of /set clock_24hour determines how the time should appear. If you /set clock_format, it *overrides* the setting of /set clock_24hour. *** News 08/25/97 -- New built in functions, $substr() and $rsubstr() These functions allow you to look for a string inside of another string. It takes two or more arguments, with the first argument being the string to look for (use double quotes if it has spaces in it) and the rest of the arguments being the words to look in. (You dont need quotes for this arg.) It returns -1 if the string could not be found, or returns the offset (counting by zero) where the string may be found in the source. $rsubstr() looks backwards from the end of the string rather than from the front. *** News 08/22/97 -- New flag to /XECHO, -B The /XECHO -B flag instructs the client to prepend the current value of BANNER_VAR before the line to be output. This allows you to output something with a banner without having to worry about BANNER_VAR. If you have have /set show_numerics ON and the hook happens to be a numeric hook, then the numeric will be output. *** News 08/20/97 -- Limits on /echo now removed There have always been limitations to the size of lines being handled for display. Recent limits have been 2048 characters or 40 lines to the screen, and 20480 characters to the lastlog or to a log file. All of these limitations have now been eliminated, and any size line (within the confines of available memory) can be handled without excuses. *** News 08/19/97 -- Handling of ^C colors, new set, /SET CONTROL_C_COLORS ^C colors (eg, ``mIRC colors'') are now handled in the output stream. Whether or not anything is done with them is controlled by a compile time option (which is further controlled by a /set). If you #define CONTROL_C_COLORS, in config.h and you /set CONTROL_C_COLORS ON, then they will be parsed and converted into colors. If you #undef it, then the value of the /set will not matter, colors will never be honored. Sorry, but the "old" behavior of leaving them unchanged in the output stream is no longer available. You either must honor them or you must have them filtered out. (I doubt anyone will have a problem with this.) By default, the #define is #undef'd, and the /set is turned off. The defaults will never change in future releases unless there is overwhelming public pressure to change them. *** News 08/17/97 -- New operator, #~ (prepend operator) This is similar to the #= operator, which appends text to a variable. This operator PREPENDS text to a given variable. *** News 08/17/97 -- New flag for /timer, -REPEAT The /timer -REPEAT flag takes one argument, which is given to be the number of times that the specified action should be repeated (every specified interval). The /timer -LIST flag reflects the number of events left to be scheduled. *** News 08/17/97 -- New script, "MOTD" This script re-implements client-side MOTD files. It uses the two below functions. Its only provided for those of you who miss this feature. *** News 08/15/97 -- New function $ftime() This function returns to you the "mtime" of a given file (see stat(2)) In ordinary words, this was the last time that the file was modified. It is the time that you see for an ordinary "ls -l" listing. It is returned in seconds since the epoch, so youll need to $strftime() or $ctime() to convert it to human format. *** News 08/15/97 -- New function $irclib() This function is only useful if you need to know where the IRCLIB is. An example of its use is the "motd" script. *** News 08/15/97 -- New function, $winbound() This function takes one argument. If the argument specified is the name or refnum of a window, then the name of the channel bound to that window (if any) is the return value. If the argument specified is the name of a channel, then the window refnum to which it is bound (if any) is the return value. In case of ambiguity (if you have a window name that looks like a channel name), the window takes precedence over the channel. *** News 08/08/97 -- Notify can now do userhost lookups automatically Most people (everybody?) do a /userhost request in their /on notify_signons, and that has been distressing to many servers, because when you connect there is a flurry of ISON and USERHOST traffic and many people have gotten trapped in "flooder mode". Some have tried, with limited success and much agony, to batch up userhost requests to help. In the interests of cutting down on client->server traffic needed for NOTIFY events, the client can now automatically fetch userhosts on your behalf. To turn on this feature, /set NOTIFY_USERHOST_AUTOMATIC on. When this is ON, the client will dispatch userhost queries for everybody who is 'triggered' for that minute. It does intelligent batching, so you wont be flooding the server as much. This is ideal for when you initially connect and your flurry of ISONs and USERHOSTs can sometimes make the server hate you. If this is OFF, then the traditional behavior applies as normal. To accomodate this new feature, /on NOTIFY_SIGNON now takes two arguments: The new second argument is the userhost of the person signing on. If you have the automatic userhost feature turned off, the second argument will be empty. *** News 08/08/97 -- New /set, /SET XTERM You may now use this set to specify what "xterm" program you want to use for /window create. Note that this can be overriden by the XTERM environment variable. This was done on purpose, so that those who have been setting the XTERM environment variable wont be suprised by the /set's "default". *** News 08/08/97 -- New servcmd support (SQUERY, SERVLIST, WALLCHOP) The client now natively recognizes the SQUERY, SERVLIST commands from av2.9 servers, and the WALLCHOP command from u2.10 servers. I didnt implement WALLCHOP in the same way as contributed, so I might get yelled at and change the implementation soon. ;-) *** News 08/08/97 -- Can send multiple files with /dcc send You may now specify more than one file with /dcc send nick . I guess thats useful in conjunction with $glob(*) or something. Each request is sent out in a seperate PRIVMSG (obviously), so you should be careful not to send out TOO many files at a time... *** News 08/08/97 -- New /on, /ON KILL This should simplify a lot of people's lives. When you recieve one of those messages "*** Notice -- Recieved KILL message for ...", /ON KILL will be hooked with the following arguments: $0 - The server who sent the message (your server) $1 - The hapless victim $2 - The bastard who did the kill $3 - The server path to the bastard $4- - The reason for the kill *** News 08/04/97 -- New /on, /ON OPER_NOTICE The server uses "sendto_ops" to send an notice to all operators. The client now automatically deals with this. $0 - the server that sent you the notice $1- - the text of the message AFTER the *** Notice --- part. *** News 07/28/97 -- New built in function, $uhc() $uhc() takes a single argument, which is a partially constructed nick!user@host pattern, and returns a fully qualified nick!user@host pattern. That is to say, any parts that are missing are filled in. This is a front end to cut_n_fix_glob(), which is the function that "fills in" your arguments to /ignore, so this works identically as the nick!user@host argument to /ignore. $uhc(nick) returns nick!*@* $uhc(user@host.com) returns *!user@host $uhc(*.host.com) returns *!*@*.host.com *** News 07/28/97 -- New /SET, DO_NOTIFY_IMMEDIATELY If this is set to ON, then when you do the /notify command, an ISON will be immediately dispatched (the usual behavior.) But if this is set to OFF, then the ISON is not immediately performed, and you will have to wait until the top of the next minute to see if the person is on. This is intended to be used in your .ircrc, because some users have a zillion people on notify, and they end up sending enough lines to the server when they connect that they activate the server's flood control mechanism, then the server starts slowing you down, and thats just a big hassle. *** News 07/28/97 -- New /SET, NOTIFY_INTERVAL This one is a bit tricky. The value of this set is taken to be a suggestion about how frequently NOTIFY checks should be performed. This does not ever make the client check at any time other than the top of every minute, but it is possible to tweak this variable so that some minutes will be skipped. For most sane people, setting this to be a multiple of 60 is advised. Setting this to less than 60 does not make it check more frequently than once a minute. /set notify_interval 60 yeilds the "customary" behavior /set notify_interval 120 makes it only check every 2 minutes /set notify_interval 150 makes it check only twice every 5 mins at minutes 3 (180s) and 5 (300s). *** News 07/28/97 -- Two new /SETs, AUTO_REJOIN_DELAY and AUTO_RECONNET_DELAY These two control the amount of time that must pass between when you are kicked or killed, and the time that you attempt to rejoin or reconnect. Reconnect is probably not totaly intuitive, as it attempts to bind the server to the current window *at the time that the timer expires*, not the window that was disconnected from. Arguably, this is a bug, and may be "fixed" in the future. The implementation for these is kind of hairy. EPIC4pre1 *** News 06/18/97 -- New feature, "CPU SAVER" Some of you have asked me for a way to make ircII use less CPU especially when you are idling and detached. Every minute ircII sends out your notify list, parses the replies, checks the clock, updates your status line, and other various housekeeping duties. But when youre detached, you dont really care if your notifies dont get processed promptly every 60 seconds, you dont care if the clock is accurate every moment, and you would prefer that the client not go to the trouble of wasting CPU time just to keep track. This wont help if youre on busy channels, or logging wallops, only if the only traffic youre getting are the pings from the server. There are several new sets: /set CPU_SAVER_AFTER - If you havent typed anything after this many minutes, CPU saver mode activates. /set CPU_SAVER_EVERY - If cpu saver mode is on, the client will only do housekeeping every this many minutes. If either of these two are 0, then cpu saver mode cannot be activated, and the "traditional" behavior will apply. If youre interested in seeing when the client is in cpu saver mode, there is a new status line expando, "%L". There is also a new /set, /SET STATUS_CPU_SAVER which determines how the %L expando will look when it is activated (just like STATUS_MAIL) There is also a new keybinding, "CPU_SAVER", which if bound to a key will activate cpu saver mode without having to wait. I did this on a whim, mostly because i havent done any features in a long time that have required this many changes, and I wanted to have some fun, so i just let loose with this and went berzerk If i forgot some obscure feature with this, let me know! ;-) *** News 05/31/97 -- New environment variable honored, ``IRC_SERVERS_FILE'' Someone had suggested something close to this -- they wanted a way to specify a SERVERS_FILE as an absolute path rather than having it in their irclib directory. So you can now set this environment variable to an absolute path where you would like the client to get your server list from. This overrides any built in SERVERS_FILE setting, if appropriate. *** News 05/31/97 -- Semantic clarification for /TOPIC Due to the confusion between the very common ``topic'' alias and the built in TOPIC command syntax, I have expanded the built in TOPIC command to do everything that everyone expects TOPIC to do, towit: /topic This is a topic (set current channel topic) /topic * This is a topic (same thing) /topic (see topic on current chan) /topic * (same thing.) /topic #chan This is atopic (set topic on #chan) I strongly advise you to throw away your /topic alias unless it does something up and beyond this. If it does, let me know, and I can include its semantics in the client, if its reasonable. *** News 05/19/97 -- All new syntax for /IF As if ircII wasnt becoming PERLish enough, ive modified the /IF command to be more perl-like: You may now use the "elsif" modifier to indicate a blocked if command, eg: if (....) { .... } elsif (...) { .... } elsif (...) { .... } else { .... } (The final "else" is optional.) Note that the placement of the "elsif" and "else" modifiers is critical: They MUST be on the same line as the closing } to which they modify, or the /LOAD parser will get totaly confused and munge the whole thing up. This is a limitation that applies only to how scripts are loaded -- sorry. *** News 05/09/97 -- New function added, $findw(word ...text ...) This addresses the two most common complaints people have about $[r]match(): 1) This function returns the WORD NUMBER of the word in text, such that $word($findw(word .text.) .text.) returns "word". It returns -1 if word is not found. 2) This function does not do anything screwy about quoting or unquoting your input. It just looks for the word, thats it. No pattern matching, no frills, and its fast. *** News 05/09/97 -- Semantic weakness closed There was a semantic weakness with respect to the word count and strlen modifiers ($#var and $@var) such that if you did not provide a variable to modify, an unuseful value was returned. Since this was likely to cause confusion, these cases are now defined to implicitly assume $* as the default argument. eg: $# all by itself is now the same as $numwords($*) $@ all by itself is now the same as $strlen($*) These are *NOT* built in functions. The # and @ characters still are considered to be modifiers. The weakness was that these modifiers did not return meaningful values when a value to modify was not provided: This change stipulates a useful default. In a seperate, but related topic, a change was also made to the math parser to honor this change in that context. That is to say, @ foo = # now assigns to `foo' the number of arguments in the current context. NOTE THAT THIS IS NOT A FUNDAMENTAL CHANGE! We're just saying that the default value for the # and @ modifiers is $*. This is not a "function"! *** News 05/05/97 -- New flag to /WINDOW, /WINDOW LASTLOG /WINDOW LASTLOG lets you individually tweak the size of a window's lastlog. This was introduced because this used to be the default beahavior of /set lastlog, but now that /set lastlog is a global action, we still need a way to do this... *** News 04/29/97 -- New /set, /SET QUIT_MESSAGE This will be your default quit message. If you do something stupid, like unset this completely, the client's version will be used as the default. Of course, any argument you pass to /quit or /signoff will override this /set. *** News 04/29/97 -- New /set, /SET DISPATCH_UNKNOWN_COMMAND If you type a command that is not recognized by the client, and youre one of those people who /never/ mistype a command, then you can /set this to ON, and the client will dispatch any otherwise unrecognized commands to the server. Im sure your server admin will love you if you do this. *** News 04/29/97 -- New built in function, $winchan() You give it a channel name, and an optional server name or server refnum, and it tells you what window refnum that channel belongs to. (Written by IceKarma) *** News 04/29/97 -- New flag to /lastlog, /lastlog -max You can use /LASTLOG -MAX to specify the maximum number of matches you want to display, regardless of any other flags. The default is no limit. This was written by Sheik. *** News 04/29/97 -- New functionality to /stack, /stack set You can now do /STACK (PUSH|POP|LIST) SET just as you can already with ALIAS/ASSIGN/ON. This was written by Colten. *** News 04/21/97 -- New set, /SET BANNER The /SET BANNER variable now controls what special banner will be prepended to informational messages from the client. Up until now, the banner has been three stars ("***"), and many people dont like that or want to be able to change it. Now you can. *** News 04/21/97 -- New on, /ON SET /ON SET is a way to extend the capabilities of the /set command. The /ON SET hook is passed two or more arguments, with $0 -- is the name of the variable to be set $1- -- is the value the variable will be set to. The main idea is the ability to offer /set variables that are not built into the client, and execute ircII code to handle that situation. The other idea is the ability to suppliment or override a built-in set variable when it is changed. If you hook /ON SET with the "SILENT" modifier ('^'), then the default action (if any) will not be taken. This may mean that if the variable is not a built in variable, no error will be output. If the variable IS a built in variable, then the variable will NOT be set after the fact. There are two ways to get around this: You can either hook the /ON SET with the "quiet" modifier ('-'), or you can use the /set command inside of the /on set body. If you attempt to /set a variable that is already being parsed by /on set, you will NOT be offered the /on again -- it will directly set the variable: Example: on ^set "exec_protection off" { echo *** You cannot set EXEC_PROTECTION off! set exec_protection on } Or: on ^set "auto_rejoin_delay *" { echo *** AUTO REJOIN delay set to [$1] seconds. @ myscript.autorejoin.delay = [$1] } Then you could do: /set auto_rejoin_delay 4 *** News 04/17/97 -- $X now reflects your ``real'' userhost When you connect to a server, the client asks the server what your userhost is, and then that value is reflected in the $X variable. Different server connections may have different $X values. *** News 04/17/97 -- Changed semantics for USERHOST command The userhost command will act the same as always, except under the following condition: If you do /userhost -cmd, and *every* nick so specified is on one of the channel(s) you are on (so that the client already has the userhost cached), then the -cmd code will be executed immediately, and the client will *NOT* ask the server for the userhost information. You are 100% guaranteed still to get accurate information, you will just get it without waiting for the server query! The only caveat is that the AWAY and OPER fields will be specified with the false value. If you currently use the /userhost command to determine if a person is an operator, keep reading. A new flag has been added to the USERHOST command, -direct. The -direct flag forces the client to do a server query for the specified nicknames, even if all of the nicknames are known to the client beforehand. This can be used to get accurate AWAY and OPER information. This flag only makes sense with the -cmd flag, since userhost caching does not happen unless the -cmd flag is specified. *** News 04/10/97 -- Two new operators =~ and !~ The two operators are intended to be similar to the perl operators: The lhs of the operator is expected to be a plaintext string, and The rhs of the operator is expected to be a wildcard expression. The operator returns a true value if the pattern matches the text, and it returns the false value if it does not. This is intended to be a low-cost alternative to the $match() and $rmatch() built-in functions when the only thing you need to do is see if a string is matched by a pattern. If you need to select from more than one pattern, use $match() or $rmatch(). *** News 04/07/97 -- Asynchronous code may use local variables You may reference local variables in asynchronous code provided that you follow the rules that have already been laid down. See the regress/kill script for more info. 1) You have to use /bless in the asynchronous code in order to have access to the underlying local variables. 2) You have to use /wait in the synchronous code in order to make sure the local variables dont go away. 3) Make sure you clean up your own messes. Asynchronous code lying around, resulting in /bless calls when there is no context for local variables is not a good thing. *** News 03/31/97 -- New argument to /WAIT command, ``for'' Yes, ``for'' without a hyphen. This command guarantees that the code given as the argument is executed synchronously. That is to say, if the arguments, when executed, sent something to the server, the command will not return until that request has been completed (as if a wait had been done.) But if the code does not send a query to the server, no wait is executed, and the command returns immediately after the code completes. You can also mix and match ``wait for'' with regular ``wait'' calls and the client will be able to figure out what to do without waiting extra more than it needs to. And as always, using /wait or /wait for and /redirect at the same time is a bad thing (tm), so dont do it. The result is undefined behavior (eg, what happens isnt my fault.) *** News 03/19/97 -- About the new who/ison (and soon userhost) queues. The client now keeps a FIFO (queue) of who/ison/userhost queries you make. It is *critically* important that you do not confuse these queues (due to the nature of these server queries, there is no way to have any reasonable error recovery). The following behaviors are forbidden (but the client wont stop you from doing them) * Using /ON ^RAW_IRC to wedge the 303, 351, or 315 numerics. If you do this, the queues wont be properly flushed, anyone waiting on a proper reply wont be handled, and any further reqeusts will be thought to be previous queries, and all hell will break loose. * Using /QUOTE to launch USERHOST, ISON, or WHO requests.. If you do this, the client will whine at you when it gets unexpected replies and will eat the information. If you launch another query before the invalid one finishes, all hell will break loose. *** THERE IS NO WAY TO RECOVER IF YOU DO THESE THINGS *** If youre stupid enough to do it, you get what you deserve. *** News 03/18/97 -- Expanded syntax for $userhost() For your convenience, the $userhost() function now takes arguments: You may specify one or more nicknames as arguments to the $userhost() function, and the corresponding userhost(s) for the nick(s) specified will be returned. The string @ will be inserted for any nicknames whose userhost is not known. The nickname(s) specified *must* be people who are on channels you are also on for the current server! (See the second caveat) * Caveat -- Because it can take time for the WHO query to complete after you join a channel, there is no definite way to know if $userhost() for a person on your channel will succeed or not. You should probably be prepared to launch a /USERHOST query in case of failure. This deficiency may be altered or modified in the future to block if an otherwise valid request is made while a WHO query is still pending. * Caveat -- This function will never be modified to launch a server query. That means that this function will only ever recognize those nicknames that are common to channels you are on. If you want to find the userhost for other users, you should use the /userhost command. It is expected that the /userhost command will soon be able to take advantage of the userhost caching (but it does not yet.) *** News 03/18/97 -- Expanded syntax for /who For your convenience, the /who command now takes two new arguments: -line {...} The code inside the braces will be executed for each line returned by the who query. The arguments are exactly the same as for the /on who hook, except that this flag is *guaranteed* to override the default /on who, and will also *go away* when the current who query is finished. -end {...} The code inside the braces will be executed at the end of the who query, when the 315 numeric is parsed. The arguments are: $0 - server queried $1 - body of the query This is guaranteed to to override the default /on 315, and will also go away once the current who query is completed. These command bodies will be executed asynchronously, which means that you must assume that the enclosing code scope will complete before the code is ever executed (e.g., the same rules as for the /userhost -cmd flag.) unless you use /wait. You are encouraged to not use /wait if you can figure a way around it. Code that is not concerned with being stricly backwards compatable with the stock client is ***strongly encouraged*** to use these new flags. Underlying this change is a new re-entrant WHO queue, which allows you to launch more than one WHO query simultaneously. No longer do concurrent WHO requests have to wait for previous queries to complete, and no longer (with the above flags) does the caller need to put the WHO command in a /stack-/on-/wait wrapper. *** News 03/17/97 -- /on 312, /on 319 changes All of the whois numerics: 311, 312, 313, 314, 317, 318, 319 now pass $0 as the server name and $1 as the target of the whois query. All the rest of the arguments are passed as $2-. Previously, some of these numerics passed the target as $1, but not all of them. I changed it this way for consistancy. *** News 03/17/97 -- New: /ON STATUS_UPDATE and $status() /ON STATUS_UPDATE is hooked whenever any of the status lines for any of the visible windows changes **and you are in dumb mode**: $0 is the refnum for the window whose status line has changed $1 is the status line in that window that has changed $2- is the actual status line for that window. $status() can be used to fetch the current status line for any visible window. Invisible windows do not have their status lines updated, so they may be inaccurate. This problem may change in the future. Pass two arguments: $0 is the refnum for a window $1 is the status line *** News 03/02/97 -- Local variables can now span entire array tree The syntax: ``local x.y.'' will define all variables in the subarray $x[y][...] to be implicitly considered local variables. That is to say, the entire variable tree rooted at $x[y] is local to that scope. This was requested by a user for compatability with another client. All local variables that are instantiated in this manner have the same scope as the explicit declaration above. *** News 02/18/97 -- New built in variable, /SET CONNECT_TIMEOUT Set this to the number of seconds you want your connect()ions to block before they time out. Note that this doesnt affect connect()ions that are already in progress, only those that are started after you set it. The default is 30. *** News 01/30/97 -- Expanded syntax for /LOCAL, /STUB You may now specify more than one name per command: Each name will be treated independantly of all others. The names must be seperated by a comma, and ***must not*** have any spaces between the commas and the names (that is, all of the names must form one logical word). To declare both "foo" and "bar" as local vars, /local foo,bar You can do this to stub more than one alias/assign to the same file, as well: /stub foo,bar filename *** News 01/29/97 -- New command /BLESS Currently this command ignores its arguments. This may change in the future, so you should not get in the habit of supplying arguments to this function, for forwards compatability. The ''BLESS'' command is used to allow an asynchronous scope to access the local variables of the underlying synchronous context: alias foobar { local myvar $0 userhost $1- -cmd { bless echo $myvar -- $0!$3@$4 } wait } Note that the use of 'bless' must be paired with an appropriate call of ``wait'' in the synchronous context, or this wont work. *** News 01/27/97 -- New flag for /EXEC, -direct Syntax: /EXEC -direct This simulates the effect that unsetting the SHELL variable causes, that is, the command is executed directly, without invoking a subshell. This is appropriate for those who wish to execute a command passing untrusted data as an argument: With this flag, there would be no shell to interpret metacharacters, thus cutting down on that ability to have an accidental back door. *** News 01/27/97 -- New command, /SETENV Syntax: /SETENV Sets the process environment variable to the value of . This command is not neccesarily useful, nor is it always appropriate, but it is provided for completeness. There are several places in the code that can benefit from the ability to change environment variables after startup (eg, TZ). It also allows you to set environment variables for /exec'd processes, and it is also possible to really foul things up if you mangle important environment variables such as DISPLAY and so on. *** News 01/24/97 -- New, /ON ODD_SERVER_STUFF This is hooked whenever the server sends you something that the client doesnt recognize. This is usually when you try to connect to a non ircd server, or you use some extension that isnt yet supported. You are strongly encouraged to use this interface to support new features rather than using /on raw_irc because this hook is only activated when something unexpected occurs (which is rare), rather than for every incoming line, as raw_irc does. $0 is the server that sent it to you, '*' if unknown $1- is the unrecognized command and its arguments. *** News 01/22/97 -- /FE, /FOREACH use local variables now The "control variables" for the /FE and /FOREACH command now are local variables. They will not disturb global variables, but they will destroy any local variables you have by the same name. You dont have to explicitly declare the variables as local, it is done automatically for you. Note that the normal warnings for local variables still apply -- dont use any variable name that is the same as a global variable you might want to use later in the same alias/on. *** News 01/18/97 -- Support for local variables You may define a local variable with the following command: LOCAL [] It mirrors the ASSIGN command. Note that local variables act in exactly the same way as normal variables, except you cannot get rid of them. You also do not (yet) have any way to get at a global variable that has the same name as a local variable, so choose wisely. An example: alias foobar { local b (declare LOCAL var $b as []) assign a 4 (assigns 4 to GLOBAL $a) local a 5 (assigns 5 to LOCAL $a) eval echo $a (outputs '5' -- local) @ a = [] (clears LOCAL variable) eval echo $a (outputs '' -- local) } Restrictions: * You cannot have local aliases -- only local variables * You cannot save local variables. * You cannot (yet) access a global variable with the same name as a local variable. This support is EXPERIMENTAL and still has some development to go before it is mature. [This file truncated for EPIC4pre1... the rest of it is available via ftp at ftp.epicsol.org] [[ Additional note ]] People are apparantly looking in here to see where some of the features (like translation tables) went to. Please refer to "doc/missing" before reporting a removed feature as a bug. Thanks. .