diff -rcN ircii-EPIC3.002/BUG_FORM ircii-EPIC3.003/BUG_FORM *** ircii-EPIC3.002/BUG_FORM Wed Mar 6 13:08:56 1996 --- ircii-EPIC3.003/BUG_FORM Thu Jan 2 17:19:48 1997 *************** *** 2,8 **** If you should see what you think to be a bug, please fill out this form and send to the following address(es): ! ircii@cris.com And we will try to get back to you as soon as we can, and will correct the bug if it is at all possible. --- 2,8 ---- If you should see what you think to be a bug, please fill out this form and send to the following address(es): ! ircii-epic@concentric.net And we will try to get back to you as soon as we can, and will correct the bug if it is at all possible. diff -rcN ircii-EPIC3.002/KNOWNBUGS ircii-EPIC3.003/KNOWNBUGS *** ircii-EPIC3.002/KNOWNBUGS Thu Oct 24 14:23:05 1996 --- ircii-EPIC3.003/KNOWNBUGS Fri Jan 17 21:17:42 1997 *************** *** 1,11 **** ! BUGS REPORTED, OUTSTANDING, OR FIXED SINCE LAST RELEASE (EPIC3.001) PENDING THINGS: -------------- BUGS FIXED/CHANGES MADE SINCE THE LAST RELEASE ---------------------------------------------- ! * Fixed $uniq(), i think ! * Fixed $numsort(), i hope ! * /ignore * crap -- /ignore * -crap -- doesnt remove the ignore. ! use /ignore * none to remove it totaly. (this is a ``feature''). --- 1,33 ---- ! BUGS REPORTED, OUTSTANDING, OR FIXED SINCE LAST RELEASE (EPIC3.002) PENDING THINGS: -------------- BUGS FIXED/CHANGES MADE SINCE THE LAST RELEASE ---------------------------------------------- ! * Fixed /QUOTE (my lamage) ! * Implemented $winvisible(). ! * Fixed the bug with /alias foobar { @ blah = 1 } ! * New CS user modes ! * ``&&([$1]==4])'' doesnt crash client if done as a command any more. ! * Aliases are now properly unstubbed, even when they arent the referant. ! * %= for the status format (crowman) ! * /window double (archon) ! * $convert() bug (crowman) ! * /set COMMENT_HACK was backwardsly confoozled. ! * Virtual host patch, with some modifications (flarp) ! * Really fixed the window double this time. ! * Improvements for on dcc_request and on dcc_connect (crowman) ! * /window beep_always (ON|OFF) -- beeps beep even when in hidden windows. ! * function_which() now suppresses error messages from uzfopen(). ! * Added /pause , a nonblocking sleep ! * Added /input_char, which is like input, but only one char. ! * Fixed bug in $repeat() reported by wc. ! * Added /repeat, which works like the standard alias, but better. ! * Fixed bug where $B wasnt being set. (Crowman) ! * Support for all 26 user modes (idea by sheik) ! * Lame bug with $chmod() (found by crowman) ! * Fixed bug with /parsekey type_text blah crashing client (Colten) ! * Added support for DalNet's /part #channel ! * Help files completed =) ! * Some sanity checking for curr_scr_win->server (Colten) diff -rcN ircii-EPIC3.002/UPDATES ircii-EPIC3.003/UPDATES *** ircii-EPIC3.002/UPDATES Tue Oct 29 15:38:18 1996 --- ircii-EPIC3.003/UPDATES Mon Dec 30 16:27:48 1996 *************** *** 1,3 **** --- 1,104 ---- + EPIC3.003 [[MORE BY DEMAND]] + + *** News 12/30/96 -- Support for all 26 possible user modes + All user modes are now supported. This should be the last + of it until someone comes up with the bright idea of making + uppercase modes mean different things (and ill strangle the + bastard who does...) I based it on the idea from sheik, but + i took a quite different approach... + + *** News 12/27/96 -- New built in command /repeat + Up until now, /repeat has been an alias. This has been a pain + in the butt, because all of them either cant be used recursively, + or theyre terribly expensive to use (or both). So now you have + a zero-overhead /repeat command that can be used without any + headaches. + + There are two forms. The old one you all know and love, and a new + form that allows you to specify an expression in parens: + + /repeat text command(s) (traditional form) + /repeat (exp) command(s) (new form) + + eg, the following two commands are equivalent: + + /repeat $var {commands} + /repeat (var) {commands) + + *** News 12/12/96 -- New command, /input_char + /input_char is identical to /input, except that it returns after + only one character has been pressed, instead of waiting for the + return key to be pressed. See the 'less' script for an example. + /input_char has problems with /wait and /pause just like /input. + + *** News 12/12/96 -- New command, /pause + If you specify an argument, the client will wait X seconds + before continuing. Its kind of a mix between /wait and /sleep, + except that this is nonblocking (unlike sleep) and doesnt send + anything to the server (unlike wait). It also doesnt assure + that you wont have any race conditions (unlikes wait) and it + will parse all incoming traffic normally (unlike sleep). + + If no argument is specfied, the client will wait for the user + to press a key. This kind of sort of works, but not really so + much as i would recommend you use it unless you do so as an + experiment as to whether it really works in the real world. + Maybe if you find bugs youll tell me about it? >;-) + + /pause does recursive calls to io() (much like /wait does). + That means that it has problems if you intermix calls to /input + while you are /pause'd, and vice versa. Let the coder beware. + + *** News 12/12/96 -- New /window option, "BEEP_ALWAYS" + This option allows you to control whether a beep in a hidden + window will still beep. (Up until now, it has not.) If this + is ON, then a beep in a hidden window will beep anyhow. If + this is OFF, then a beep in a hidden window will be silent. + + *** News 12/12/96 -- /ON DCC_CONNECT/DCC_REQUEST changed + + Arguments to /ON DCC_REQUEST are now: + $0 Nickname of other peer + $1 The type of DCC + $2 Filename or other information + $3 The remote IP + $4 The remote port + $5 Filename (DCC SEND only) + $6 File Size (DCC SEND only) + + Arguments to /ON DCC_CONNECT are now: + $0 Nickname of the other peer + $1 The type of DCC + $2 The remote IP + $3 The remote port + $4 Filename (DCC SEND only) + $5 File Size (DCC SEND only) + + *** News 12/10/96 -- Virtual Hostname support + The IRCHOST environment variable, and the /hostname (/irchost) + commands reflect this new support. Supposedly it works on + feeding, so i guess its ok. (thanks to flarp) + + *** News 12/09/96 -- Double line status bar + /window double and its attendant features have been added. + You can thank Archon for doing all the work =) + + *** News 12/06/96 -- New status line variable + You can now use %= in your status format to denote when + you are a channel voice (+v). It only goes on when you are + +v but not also +o. (Crowman) + + *** News 11/25/96 -- New Built in function $winvisible() + Archon pestered me enough to put this in that i did so that + he would leave me alone. ;-) + + It takes one argument, a reference to a window. + The return value is: + 1 if window exists and is visible + 0 if window exists and is hidden + -1 if the window does not exist (error) + + EPIC3.002 [[MINOR RELEASE]] *** News 10/29/96 -- New functionality to /timer *************** *** 104,110 **** *** News 09/18/96 -- Information about /on send_notice /on send_notice is triggered any time you send a notice or a notice is sent on your behalf, unless such triggering would cause an infinite ! loop, in which case the /on is NOT triggered. If you want to send a notice without it ever being triggered, try /quote notice instead. *** News 09/18/96 -- /set AUTO_REJOIN semantics fixed --- 205,211 ---- *** News 09/18/96 -- Information about /on send_notice /on send_notice is triggered any time you send a notice or a notice is sent on your behalf, unless such triggering would cause an infinite ! loop, in that case the /on is NOT triggered. If you want to send a notice without it ever being triggered, try /quote notice instead. *** News 09/18/96 -- /set AUTO_REJOIN semantics fixed *************** *** 279,285 **** *** News 05/04/96 -- New command, /HOSTNAME (demon) At the request of DemoN, ive added the /HOSTNAME command ! which allows those with dynamic/multiple IP addresses to change the address that DCC should use without having to restart the client. --- 380,386 ---- *** News 05/04/96 -- New command, /HOSTNAME (demon) At the request of DemoN, ive added the /HOSTNAME command ! that allows those with dynamic/multiple IP addresses to change the address that DCC should use without having to restart the client. *************** *** 529,535 **** *** News 03/08/96 -- Support for //^ "feature" ! The //^ "feature" which is used by many large and widely used scripts is now supported again by popular demand. However, you should NOT use this "feature" in new scripts, *please* use the syntactically correct ^// construct. Thanks. --- 630,636 ---- *** News 03/08/96 -- Support for //^ "feature" ! The //^ "feature" that is used by many large and widely used scripts is now supported again by popular demand. However, you should NOT use this "feature" in new scripts, *please* use the syntactically correct ^// construct. Thanks. *************** *** 637,643 **** *** News 02/25/96 -- Fixed horrendous ++/-- bugs. ! The ++/-- operators, which had a few non-trivial bugs before, have been revamped to work in all situtations. The only catch is that they do not actually operate on the values until such time as they are parsed. That is to say that a prefix operator --- 738,744 ---- *** News 02/25/96 -- Fixed horrendous ++/-- bugs. ! The ++/-- operators, that had a few non-trivial bugs before, have been revamped to work in all situtations. The only catch is that they do not actually operate on the values until such time as they are parsed. That is to say that a prefix operator *************** *** 686,692 **** The -s and -S command line arguments, which were overloaded to allow you to specify a default server have now lost that semantic. -s and -S now have only their classical meanings, whether or not ! to use ircserv (which is still broken, btw). *** News 01/15/96 -- The semantics for $splice() Semantics for the heretoforth "undocumented" function $splice(): --- 787,793 ---- The -s and -S command line arguments, which were overloaded to allow you to specify a default server have now lost that semantic. -s and -S now have only their classical meanings, whether or not ! to use ircserv *** News 01/15/96 -- The semantics for $splice() Semantics for the heretoforth "undocumented" function $splice(): *************** *** 718,724 **** as the script version was. *** News 01/15/96 -- Added $geom() ! Returns the value of the global variables CO and LI which correspond to the number of columns and the number of lines, respectively, in the main screen for ircII. If you have more then one screen open and they are of different sizes, --- 819,825 ---- as the script version was. *** News 01/15/96 -- Added $geom() ! Returns the value of the global variables CO and LI that correspond to the number of columns and the number of lines, respectively, in the main screen for ircII. If you have more then one screen open and they are of different sizes, *************** *** 852,858 **** Apparantly it *is* possible to get a quit message for youself in an otherwise legitimite context. I still dont believe it is possible, but the bug reports are coming in. Now it just emits ! a cryptic error message which is not fatal. *** News 12/28/95 -- Fixed /dump on (reported by Oldpink) --- 953,959 ---- Apparantly it *is* possible to get a quit message for youself in an otherwise legitimite context. I still dont believe it is possible, but the bug reports are coming in. Now it just emits ! a cryptic error message that is not fatal. *** News 12/28/95 -- Fixed /dump on (reported by Oldpink) *************** *** 1371,1377 **** *** News 04/08/95: EMACS keybindings no longer bound by default (keys.c) Someone from Europe said that using EPIC on scandinavean keyboards was difficult at best becuase of the emacs metakey ! bindings which i doubt anyone uses anyhow. You can #define EMACS_KEYBINDS if you want them, or just /bind them in your .ircrc --- 1472,1478 ---- *** News 04/08/95: EMACS keybindings no longer bound by default (keys.c) Someone from Europe said that using EPIC on scandinavean keyboards was difficult at best becuase of the emacs metakey ! bindings that i doubt anyone uses anyhow. You can #define EMACS_KEYBINDS if you want them, or just /bind them in your .ircrc *************** *** 1419,1425 **** that the first time you attempt to use that alias, the file it is stubbed to will be loaded. Therefore, if the alias is never used, the file it is contained in will never be ! loaded (Obviously, if another alias which is stubbed to the same file is used, all aliases in that file will also be unstubbed.) The idea is that instead of loading a very large script pack on boot up, you can create a file that --- 1520,1526 ---- that the first time you attempt to use that alias, the file it is stubbed to will be loaded. Therefore, if the alias is never used, the file it is contained in will never be ! loaded (Obviously, if another alias that is stubbed to the same file is used, all aliases in that file will also be unstubbed.) The idea is that instead of loading a very large script pack on boot up, you can create a file that *************** *** 1472,1478 **** to specify a file containing at run time, user ids in integer form, that will be authorized to run the program. Unauthorized users will be "spoofed" -- that is, ircII will execute another ! program (which you may also define) without giving any clues. You may also specify a password that will be used in conjunction with uid checking. --- 1573,1579 ---- to specify a file containing at run time, user ids in integer form, that will be authorized to run the program. Unauthorized users will be "spoofed" -- that is, ircII will execute another ! program (that you may also define) without giving any clues. You may also specify a password that will be used in conjunction with uid checking. *************** *** 1484,1490 **** *** News 03/26/95: Fixed bug with ${} expando (alias.c) ! The ${} expando (which allows you to switch to the expression context from within the command context) didnt allow nesting before. I consider this a bug, so i fixed it. (ie, ${[${foo}bar]} now is the variable $foo followed --- 1585,1591 ---- *** News 03/26/95: Fixed bug with ${} expando (alias.c) ! The ${} expando (that allows you to switch to the expression context from within the command context) didnt allow nesting before. I consider this a bug, so i fixed it. (ie, ${[${foo}bar]} now is the variable $foo followed *************** *** 1741,1747 **** *************************************************************************** EPIC1.003 (vars.h.proto vars.c alias.c) ! Added new set, /set PAD_CHAR which is used to determine the padding character used in the "width" expando (ie, $[10]foo). While syntatically PAD_CHAR may be set to any string, only the first character will actually be used and the rest are ignored. --- 1842,1848 ---- *************************************************************************** EPIC1.003 (vars.h.proto vars.c alias.c) ! Added new set, /set PAD_CHAR that is used to determine the padding character used in the "width" expando (ie, $[10]foo). While syntatically PAD_CHAR may be set to any string, only the first character will actually be used and the rest are ignored. *************** *** 1790,1796 **** would return "1" becuase the 1st pattern matches the string. Note the use of quotation marks around the 2nd and 3rd argument ! (which contain spaces) which allow them to be considered as one logical word. An example that combines the previous two features: --- 1891,1897 ---- would return "1" becuase the 1st pattern matches the string. Note the use of quotation marks around the 2nd and 3rd argument ! (which contain spaces) allows them to be considered as one logical word. An example that combines the previous two features: *************** *** 1838,1844 **** Included stuff from wintrhawk: (everything from here on till you see the 2.3.22+11 line is from WintrHawk) ! Added 6 new STATUS_USER [4..9] variables which will only show in your NON-CURRENT window. SHOW_STATUS_ALL must be OFF for these to work. You can predefine these in the config.h or utilise them in exactly the same manner as you would STATUS_USER[..3]. --- 1939,1945 ---- Included stuff from wintrhawk: (everything from here on till you see the 2.3.22+11 line is from WintrHawk) ! Added 6 new STATUS_USER [4..9] variables that will only show in your NON-CURRENT window. SHOW_STATUS_ALL must be OFF for these to work. You can predefine these in the config.h or utilise them in exactly the same manner as you would STATUS_USER[..3]. *************** *** 1863,1869 **** release information during a CTCP VERSION reply. Maybe one of these days I'll have it autoconfig'd with the Gnu AutoConfigure Script. ! Fixed the bug which hop introduced that would strip all leading whitespaces from the input line. Maybe he had a hidden agenda for doing that... I just found it annoying. --- 1964,1970 ---- release information during a CTCP VERSION reply. Maybe one of these days I'll have it autoconfig'd with the Gnu AutoConfigure Script. ! Fixed the bug that hop introduced that would strip all leading whitespaces from the input line. Maybe he had a hidden agenda for doing that... I just found it annoying. *************** *** 2229,2237 **** $X now returns your userhost $Y now returns your ircname ! (*** Deleted info about $tert() function which was obsolete) ! Added the builtin function $onchannel() which returns everyone on the channel given, but is only reliable if you are ON that channel. Returns a null if you are not. --- 2330,2338 ---- $X now returns your userhost $Y now returns your ircname ! (*** Deleted info about $tert() function that is obsolete) ! Added the builtin function $onchannel() that returns everyone on the channel given, but is only reliable if you are ON that channel. Returns a null if you are not. *************** *** 2247,2253 **** New command "REALNAME" (or "IRCNAME") allows you to change your REALNAME (the text on the right in the first line of ! a whois reply), which will take effect after you use the command "RECONNECT" --- 2348,2354 ---- New command "REALNAME" (or "IRCNAME") allows you to change your REALNAME (the text on the right in the first line of ! a whois reply), it will take effect after you use the command "RECONNECT" diff -rcN ircii-EPIC3.002/doc/Copyright ircii-EPIC3.003/doc/Copyright *** ircii-EPIC3.002/doc/Copyright Fri May 10 14:25:41 1996 --- ircii-EPIC3.003/doc/Copyright Thu Jan 2 17:05:53 1997 *************** *** 19,26 **** warranties of merchantibility and fitness for a particular purpose. Some modifications made to the original ("stock") client: ! Copyright (C) 1993, 1996 Jeremy Nelson, Copyright (C) 1994 Jake Khuon, ! Copyright (C) 1995, 1996 Jeremy Nelson and others ("EPIC software labs"), the rights to which are granted non-exclusively to matthew green and are provided to you under the terms of this license. --- 19,26 ---- warranties of merchantibility and fitness for a particular purpose. Some modifications made to the original ("stock") client: ! Copyright (C) 1993, 1997 Jeremy Nelson, Copyright (C) 1994 Jake Khuon, ! Copyright (C) 1995, 1997 Jeremy Nelson and others ("EPIC software labs"), the rights to which are granted non-exclusively to matthew green and are provided to you under the terms of this license. diff -rcN ircii-EPIC3.002/doc/EPIC_ABOUT ircii-EPIC3.003/doc/EPIC_ABOUT *** ircii-EPIC3.002/doc/EPIC_ABOUT Fri Nov 1 19:09:17 1996 --- ircii-EPIC3.003/doc/EPIC_ABOUT Mon Jan 6 13:02:34 1997 *************** *** 23,29 **** ftp.cris.com /pub/ircii Kanan ftp.comco.com /pub/irc/clients/epic Demon ftp.neato.org /pub/irc hop ! ftp.crystalis.com /pub/EPIC Yoshi ftp.acronet.net /pub/ircii hop ftp.cdc.net /pub/users/crimedog/irc/epic Crimedog ftp.undernet.org /pub/irc/clients Mmmm --- 23,29 ---- ftp.cris.com /pub/ircii Kanan ftp.comco.com /pub/irc/clients/epic Demon ftp.neato.org /pub/irc hop ! ftp.parodius.com /pub/EPIC YOSHi ftp.acronet.net /pub/ircii hop ftp.cdc.net /pub/users/crimedog/irc/epic Crimedog ftp.undernet.org /pub/irc/clients Mmmm *************** *** 57,64 **** not allow you to do anything that is deemed illegal by the protocol. EPIC is complete: EPIC supplies over 100 various functions and commands ! which allow you to do things very quickly things that required very large ! or slow scripts in the past. EPIC is fully ANSI-compliant. Most current versions of the stock client do have full prototyping for all functions, which has the same net effect --- 57,64 ---- not allow you to do anything that is deemed illegal by the protocol. EPIC is complete: EPIC supplies over 100 various functions and commands ! which allow you to do things very quickly that required very large or slow ! scripts in the past. EPIC is fully ANSI-compliant. Most current versions of the stock client do have full prototyping for all functions, which has the same net effect diff -rcN ircii-EPIC3.002/doc/EPIC_THANKS ircii-EPIC3.003/doc/EPIC_THANKS *** ircii-EPIC3.002/doc/EPIC_THANKS Tue Sep 17 14:33:46 1996 --- ircii-EPIC3.003/doc/EPIC_THANKS Tue Dec 10 09:35:01 1996 *************** *** 4,23 **** Kanan, Programmer, Mailing list, Archivist WintrHawk, Programmer CrowMan, Contributer, Mirror, Archivist - Murple, Contributer, Mirror - DeadelviS, Contributer, Mirror Panasync Contributer TaCo Contributer Edge, Contributer Chaos, Contributer Oldpink, Contributer - Texaco, Contributer - Archon, Contributer - Chris Mattingly, Contributer Jos Bakus, Contributer aStaroth, Contributer Crimedog Contributer ! wc, Contribuer Bob Page, Tester, Mirror DemoN, Tester, Mirror Yoshi, Tester, Mirror --- 4,24 ---- Kanan, Programmer, Mailing list, Archivist WintrHawk, Programmer CrowMan, Contributer, Mirror, Archivist Panasync Contributer + Archon, Contributer + wc, Contributer + Texaco, Contributer + Chris Mattingly, Contributer + DeadelviS, Contributer + Murple, Contributer TaCo Contributer Edge, Contributer Chaos, Contributer Oldpink, Contributer Jos Bakus, Contributer aStaroth, Contributer Crimedog Contributer ! flarp, Contributer Bob Page, Tester, Mirror DemoN, Tester, Mirror Yoshi, Tester, Mirror diff -rcN ircii-EPIC3.002/doc/EPIC_VERSIONS ircii-EPIC3.003/doc/EPIC_VERSIONS *** ircii-EPIC3.002/doc/EPIC_VERSIONS Fri Nov 1 19:16:23 1996 --- ircii-EPIC3.003/doc/EPIC_VERSIONS Thu Jan 2 17:07:29 1997 *************** *** 37,39 **** --- 37,40 ---- EPIC3 - 04/21/96 EPIC client V3.0 EPIC3.001 - 10/14/96 Major enhancements, efficiency, bugs. EPIC3.002 - 11/01/96 Minor enhancements, bug fixes + EPIC3.003 - 01/13/97 Moderate enhancements, bug fixes diff -rcN ircii-EPIC3.002/include/config.h ircii-EPIC3.003/include/config.h *** ircii-EPIC3.002/include/config.h Fri Nov 1 19:04:09 1996 --- ircii-EPIC3.003/include/config.h Tue Dec 10 00:05:55 1996 *************** *** 431,437 **** #define DEFAULT_STATUS_CHANNEL " %C" #define DEFAULT_STATUS_CHANOP "@" #define DEFAULT_STATUS_CLOCK " %T" ! #define DEFAULT_STATUS_FORMAT "%T [%R] %*%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %D %U %W" #define DEFAULT_STATUS_HOLD "Held: " #define DEFAULT_STATUS_HOLD_LINES "%B" #define DEFAULT_STATUS_INSERT "" --- 431,439 ---- #define DEFAULT_STATUS_CHANNEL " %C" #define DEFAULT_STATUS_CHANOP "@" #define DEFAULT_STATUS_CLOCK " %T" ! #define DEFAULT_STATUS_FORMAT "%T [%R] %*%=%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %D %U %W" ! #define DEFAULT_STATUS_FORMAT1 "%T [%R] %*%=%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %U" ! #define DEFAULT_STATUS_FORMAT2 "%W %X %Y %Z" #define DEFAULT_STATUS_HOLD "Held: " #define DEFAULT_STATUS_HOLD_LINES "%B" #define DEFAULT_STATUS_INSERT "" *************** *** 458,463 **** --- 460,466 ---- #define DEFAULT_STATUS_USER7 "" #define DEFAULT_STATUS_USER8 "" #define DEFAULT_STATUS_USER9 "" + #define DEFAULT_STATUS_VOICE "+" #define DEFAULT_STATUS_WINDOW "^^^^^^^^" #define DEFAULT_SUPPRESS_SERVER_MOTD 0 #define DEFAULT_SUPPRESS_FROM_REMOTE_SERVER 0 diff -rcN ircii-EPIC3.002/include/if.h ircii-EPIC3.003/include/if.h *** ircii-EPIC3.002/include/if.h Fri Sep 13 18:56:24 1996 --- ircii-EPIC3.003/include/if.h Tue Dec 17 13:46:27 1996 *************** *** 24,28 **** --- 24,29 ---- extern void forcmd _((char *, char *, char *)); extern void fec _((char *, char *, char *)); extern void switchcmd _((char *, char *, char *)); + extern void repeatcmd _((char *, char *, char *)); #endif /* __if_h */ diff -rcN ircii-EPIC3.002/include/irc.h ircii-EPIC3.003/include/irc.h *** ircii-EPIC3.002/include/irc.h Tue Sep 17 16:44:07 1996 --- ircii-EPIC3.003/include/irc.h Thu Jan 2 18:56:59 1997 *************** *** 14,20 **** #define IRCII_COMMENT "All the things phone wont include....." #define IRCRC_NAME "/.ircrc" ! #define EMAIL_CONTACT "ircii@cris.com" /* * Here you can set the in-line quote character, normally backslash, to --- 14,20 ---- #define IRCII_COMMENT "All the things phone wont include....." #define IRCRC_NAME "/.ircrc" ! #define EMAIL_CONTACT "ircii-epic@concentric.net" /* * Here you can set the in-line quote character, normally backslash, to *************** *** 219,224 **** --- 219,225 ---- extern char * last_notify_nick; extern char * my_path; extern char MyHostName[]; + extern char * LocalHostName; extern char nickname[]; extern char oper_command; extern char * public_nick; *************** *** 234,239 **** --- 235,241 ---- extern char wait_nick[]; extern char whois_nick[]; extern struct in_addr MyHostAddr; + extern struct in_addr LocalHostAddr; extern struct in_addr local_ip_address; extern time_t start_time; extern time_t idle_time; *************** *** 258,264 **** extern void irc_exit _((int, char *, ...)); extern void irc_quit _((char, char *)); extern int is_channel _((char *)); - extern char * new_malloc _((int)); extern void new_stty _((char *)); extern char * next_expr _((char **, char)); extern int wild_match _((char *, char *)); --- 260,265 ---- diff -rcN ircii-EPIC3.002/include/ircaux.h ircii-EPIC3.003/include/ircaux.h *** ircii-EPIC3.002/include/ircaux.h Sun Aug 25 08:53:22 1996 --- ircii-EPIC3.003/include/ircaux.h Thu Jan 2 18:52:34 1997 *************** *** 33,40 **** extern char *rfgets _((char *, int, FILE *)); extern char *path_search _((char *, char *)); extern char *double_quote _((char *, char *)); ! extern char *new_malloc _((int)); ! extern char *new_realloc _((char *, int)); extern char * malloc_strcpy _((char **, char *)); extern char * malloc_strcat _((char **, char *)); extern char * m_s3cat_s _((char **, char *, char *)); --- 33,40 ---- extern char *rfgets _((char *, int, FILE *)); extern char *path_search _((char *, char *)); extern char *double_quote _((char *, char *)); ! extern char *new_malloc _((size_t)); ! extern char *new_realloc _((char *, size_t)); extern char * malloc_strcpy _((char **, char *)); extern char * malloc_strcat _((char **, char *)); extern char * m_s3cat_s _((char **, char *, char *)); diff -rcN ircii-EPIC3.002/include/names.h ircii-EPIC3.003/include/names.h *** ircii-EPIC3.002/include/names.h Wed Mar 6 13:08:58 1996 --- ircii-EPIC3.003/include/names.h Mon Dec 9 07:21:14 1996 *************** *** 39,44 **** --- 39,45 ---- int limit; /* max users for the channel */ char * key; /* key for this channel */ char chop; /* true if you are chop */ + char voice; /* true if you are voiced */ Window * window; /* the window that the channel is "on" */ NickList * nicks; /* pointer to list of nicks on channel */ } ChannelList; *************** *** 52,57 **** --- 53,59 ---- extern char * create_channel_list _((Window *)); extern char * get_channel_mode _((char *, int)); extern int get_channel_oper _((char *, int)); + extern int get_channel_voice _((char *, int)); extern int im_on_channel _((char *)); extern int is_channel_mode _((char *, int, int)); extern int is_chanop _((char *, char *)); diff -rcN ircii-EPIC3.002/include/output.h ircii-EPIC3.003/include/output.h *** ircii-EPIC3.002/include/output.h Wed Mar 6 13:08:58 1996 --- ircii-EPIC3.003/include/output.h Thu Jan 2 18:58:11 1997 *************** *** 16,32 **** #include "irc_std.h" #include "irc.h" ! extern void put_it _((char *, ...)); ! extern void say _((char *, ...)); ! extern void help_put_it _((char *, char *,...)); ! extern void yell _((char *, ...)); ! extern void send_to_server _((char *, ...)); extern void sig_refresh_screen _((int)); extern void refresh_screen _((char, char *)); extern void init_screen _((void)); extern void set_continued_line _((char *)); extern FILE *irclog_fp; ! extern void put_file _((char *)); extern void extern_write _((char *, char *, char *)); #endif /* _OUTPUT_H_ */ --- 16,31 ---- #include "irc_std.h" #include "irc.h" ! extern void put_it _((const char *, ...)); ! extern void say _((const char *, ...)); ! extern void help_put_it _((const char *, const char *,...)); ! extern void yell _((const char *, ...)); extern void sig_refresh_screen _((int)); extern void refresh_screen _((char, char *)); extern void init_screen _((void)); extern void set_continued_line _((char *)); extern FILE *irclog_fp; ! extern void put_file _((const char *)); extern void extern_write _((char *, char *, char *)); #endif /* _OUTPUT_H_ */ diff -rcN ircii-EPIC3.002/include/server.h ircii-EPIC3.003/include/server.h *** ircii-EPIC3.002/include/server.h Mon Oct 14 13:07:42 1996 --- ircii-EPIC3.003/include/server.h Thu Jan 2 18:58:19 1997 *************** *** 51,57 **** char *version_string; /* what is says */ int whois; /* true if server sends numeric 318 */ int flags; /* Various flags */ ! char umode[11]; /* User mode */ int connected; /* true if connection is assured */ int write; /* write descriptor */ int read; /* read descriptior */ --- 51,57 ---- char *version_string; /* what is says */ int whois; /* true if server sends numeric 318 */ int flags; /* Various flags */ ! char umode[27]; /* User mode */ int connected; /* true if connection is assured */ int write; /* write descriptor */ int read; /* read descriptior */ *************** *** 78,84 **** extern int read_server_file _((void)); extern void display_server_list _((void)); extern int server_list_size _((void)); ! extern void send_to_server _((char *, ...)); extern WhoisStuff *get_server_whois_stuff _((int)); extern WhoisQueue *get_server_qhead _((int)); --- 78,84 ---- extern int read_server_file _((void)); extern void display_server_list _((void)); extern int server_list_size _((void)); ! extern void send_to_server _((const char *, ...)); extern WhoisStuff *get_server_whois_stuff _((int)); extern WhoisQueue *get_server_qhead _((int)); *************** *** 133,148 **** /* server_list: the list of servers that the user can connect to,etc */ extern Server *server_list; ! #define USER_MODE_C 0x0001 ! #define USER_MODE_D 0x0002 ! #define USER_MODE_F 0x0004 ! #define USER_MODE_I 0x0008 ! #define USER_MODE_K 0x0010 ! #define USER_MODE_R 0x0020 ! #define USER_MODE_S 0x0040 ! #define USER_MODE_U 0x0080 ! #define USER_MODE_W 0x0100 ! #define CLOSING_SERVER 0x0200 #endif /* _SERVER_H_ */ --- 133,179 ---- /* server_list: the list of servers that the user can connect to,etc */ extern Server *server_list; + extern const char *umodes; ! /* ! * Each server has a "flags" member, which is a long. ! * That means it probably has at least 32 bits in it. ! * 26 of those bits are reserved for the 26 possible ! * user modes, and the 32nd bit is reserved for the ! * current status of the connection. ! */ ! #define USER_MODES 0x0001 ! ! /* These are stricly for informational purposes. DO NOT USE THEM! */ ! #if 0 ! #define USER_MODE_A USER_MODES << 0 ! #define USER_MODE_B USER_MODES << 1 ! #define USER_MODE_C USER_MODES << 2 ! #define USER_MODE_D USER_MODES << 3 ! #define USER_MODE_E USER_MODES << 4 ! #define USER_MODE_F USER_MODES << 5 ! #define USER_MODE_G USER_MODES << 6 ! #define USER_MODE_H USER_MODES << 7 ! #define USER_MODE_I USER_MODES << 8 ! #define USER_MODE_J USER_MODES << 9 ! #define USER_MODE_K USER_MODES << 10 ! #define USER_MODE_L USER_MODES << 11 ! #define USER_MODE_M USER_MODES << 12 ! #define USER_MODE_N USER_MODES << 13 ! #define USER_MODE_O USER_MODES << 14 ! #define USER_MODE_P USER_MODES << 15 ! #define USER_MODE_Q USER_MODES << 16 ! #define USER_MODE_R USER_MODES << 17 ! #define USER_MODE_S USER_MODES << 18 ! #define USER_MODE_T USER_MODES << 19 ! #define USER_MODE_U USER_MODES << 20 ! #define USER_MODE_V USER_MODES << 21 ! #define USER_MODE_W USER_MODES << 22 ! #define USER_MODE_X USER_MODES << 23 ! #define USER_MODE_Y USER_MODES << 24 ! #define USER_MODE_Z USER_MODES << 25 ! #endif ! ! #define CLOSING_SERVER USER_MODES << 31 #endif /* _SERVER_H_ */ diff -rcN ircii-EPIC3.002/include/vars.h ircii-EPIC3.003/include/vars.h *** ircii-EPIC3.002/include/vars.h Sun Oct 6 21:50:06 1996 --- ircii-EPIC3.003/include/vars.h Mon Dec 9 22:35:22 1996 *************** *** 104,109 **** --- 104,111 ---- STATUS_CHANOP_VAR, STATUS_CLOCK_VAR, STATUS_FORMAT_VAR, + STATUS_FORMAT1_VAR, + STATUS_FORMAT2_VAR, STATUS_HOLD_VAR, STATUS_HOLD_LINES_VAR, STATUS_INSERT_VAR, *************** *** 130,135 **** --- 132,138 ---- STATUS_USER7_VAR, STATUS_USER8_VAR, STATUS_USER9_VAR, + STATUS_VOICE_VAR, STATUS_WINDOW_VAR, SUPPRESS_SERVER_MOTD_VAR, SUPPRESS_FROM_REMOTE_SERVER, diff -rcN ircii-EPIC3.002/include/window.h ircii-EPIC3.003/include/window.h *** ircii-EPIC3.002/include/window.h Wed Mar 6 13:08:59 1996 --- ircii-EPIC3.003/include/window.h Thu Dec 12 12:22:50 1996 *************** *** 100,108 **** * hidden */ int update; /* window needs updating flag */ unsigned miscflags; /* Miscellaneous flags. */ char *prompt; /* A prompt string, usually set by EXEC'd process */ ! char *status_line; /* The status line string */ Display *top_of_display, /* Pointer to first line of display structure */ *display_ip; /* Pointer to insertiong point of display --- 100,110 ---- * hidden */ int update; /* window needs updating flag */ unsigned miscflags; /* Miscellaneous flags. */ + int beep_always; /* Beep even when hidden */ char *prompt; /* A prompt string, usually set by EXEC'd process */ ! char *status_line[2]; /* The status line string */ ! int double_status; /* Whether to display the 2nd status */ Display *top_of_display, /* Pointer to first line of display structure */ *display_ip; /* Pointer to insertiong point of display *************** *** 227,232 **** --- 229,235 ---- extern void redraw_all_status _((void)); extern void message_to _((u_int)); extern void message_from _((char *, int)); + extern int get_visible_by_refnum _((char *)); extern unsigned int window_display; extern int is_main_screen _((struct ScreenStru *)); diff -rcN ircii-EPIC3.002/script/2.8script ircii-EPIC3.003/script/2.8script *** ircii-EPIC3.002/script/2.8script Tue Oct 8 21:43:19 1996 --- ircii-EPIC3.003/script/2.8script Tue Jan 14 10:40:33 1997 *************** *** 1,6 **** ! /* This script is intended for use with 2.8 servers on all sites. ! It handles some formatting options and join options for novice users ! THIS VERSION IS FOR EPIC CLIENTS ONLY (EPIC3.001 or up) */ /* I dont know why the client cant do this... */ alias join --- 1,15 ---- ! /* ! * This script is intended for use with 2.8 servers on all sites. ! * It handles some formatting options and join options for novice users ! * ! * This script references some aliases that are in 'basical'. Both of ! * these scripts should be loaded from 'global', so that should not be ! * a problem. This script will _not_ work correctly if 'basical' is not ! * loaded from 'global'. This script is a dependancy for other scripts. ! * ! * THIS SCRIPT MUST ALWAYS BE LOADED, OR OTHER SCRIPTS MIGHT NOT WORK! ! * THIS VERSION IS FOR EPIC CLIENTS ONLY (EPIC3.001 or up) ! */ /* I dont know why the client cant do this... */ alias join *************** *** 23,39 **** alias leave { ! switch ($*) { (*,*) { ! leave $before(, $*) ! leave $after(, $*) } (#*) (&*) (0) (-*) { //leave $* } () (\*) ! { //leave * } (*) { //leave #$* } } --- 32,48 ---- alias leave { ! switch ($0) { (*,*) { ! leave $before(, $0) $1- ! leave $after(, $0) $1- } (#*) (&*) (0) (-*) { //leave $* } () (\*) ! { //leave * $1- } (*) { //leave #$* } } *************** *** 53,68 **** } } - alias mode3 modethree - alias modethree fe ($2-) x y z {mode $0 $1 $x $y $z} - alias cinfo echo $info(c) - /* * I broke this, more or less on purpose on epic3.001. * This makes it look like it did before. */ on ^send_public * echo > $1- /* Trace information */ on ^200 * { unless (tracepath) (tracepath = [$0]) --- 62,76 ---- } } /* * I broke this, more or less on purpose on epic3.001. * This makes it look like it did before. */ on ^send_public * echo > $1- + on ^ctcp ^"% % ERRMSG *no such function*" + on ^dcc_raw ^"% % D %" + /* Trace information */ on ^200 * { unless (tracepath) (tracepath = [$0]) *************** *** 89,94 **** --- 97,103 ---- on ^213 * echo $o.b() $1:$2:$3:$4:$5:$6 on ^214 * echo $o.b() $1:$2:$3:$4:$5:$6 on ^215 * echo $o.b() $1:$2:$3:$4:$5:$6 + /* K lines */ on ^216 * { (astuff = [$*]) diff -rcN ircii-EPIC3.002/script/basical ircii-EPIC3.003/script/basical *** ircii-EPIC3.002/script/basical Wed Mar 6 13:08:59 1996 --- ircii-EPIC3.003/script/basical Tue Dec 10 09:51:56 1996 *************** *** 44,54 **** # Reverse text with Ctrl-R bind ^r type  - # Fix for window output - # window name ircII ! #... level all,-crap ! # set window level all,-crap # Sent notices should by default not be visible on ^send_notice * : --- 44,71 ---- # Reverse text with Ctrl-R bind ^r type  window name ircII ! ! # ! # These functions are _absolutely_ neccesary for other scripts to work ! # correctly. That means that loading this script from global is _not_ ! # optional. ! # ! alias mode3 modethree ! alias modethree fe ($2-) x y z {mode $0 $1 $x $y $z} ! alias cinfo echo $info(c) ! alias o.b @ function_return = (SHOW_NUMERICS==[ON]) ? H : [***] ! alias return @ function_return = [$*] ! alias locdomain ! { ! if (!(function_return = after(-2 . $X))) ! { ! @ function_return = X ! } ! } ! alias localwho who -host *.$locdomain() ! alias recho eval echo $* ! alias rwhois quote whois $0 $1 # Sent notices should by default not be visible on ^send_notice * : diff -rcN ircii-EPIC3.002/script/cstrip ircii-EPIC3.003/script/cstrip *** ircii-EPIC3.002/script/cstrip Wed Dec 31 18:00:00 1969 --- ircii-EPIC3.003/script/cstrip Sat Dec 28 13:28:34 1996 *************** *** 0 **** --- 1,25 ---- + alias cstrip { + fec ($*) cc { + if (cc == chr(3)) { + @ havecolor = 1 + } + if (havecolor) { + if ((cc != chr(3)) && (!isdigit($cc)) && (cc != [,]) && (cc != [ ])) { + @ havecolor = 0 + @ output #= cc + } + }{ + @ output #= cc + } + } + @ function_return = output + @ output = havecolor = [] + } + + eval on ^public "% % *$chr(3)*" {echo <$0> $cstrip($2-)} + eval on ^public_other "% % *$chr(3)*" {echo <$0:$1> $cstrip($2-)} + eval on ^public_notice "% % *$chr(3)*" {echo -$0:$1- $cstrip($2-)} + eval on ^action "% % *$chr(3)*" { + echo ^B*^B $0${([$1]==C) ? [] : [:$1] $cstrip($2-)} + } + #wc'96 diff -rcN ircii-EPIC3.002/script/less ircii-EPIC3.003/script/less *** ircii-EPIC3.002/script/less Wed Dec 31 18:00:00 1969 --- ircii-EPIC3.003/script/less Thu Dec 12 23:49:44 1996 *************** *** 0 **** --- 1,56 ---- + # + # A file pager. A demonstration of how to do something useful in ircII. + # This cheesy rip-off was written by hop in 1996. + # My apologies in advance to archon. + # + + alias less + { + if ([$0]) + { + if (fexist($0) == 1) + { + @ fd = open($0 R) + less_file $fd ${winsize() - 1} + } + { + echo $0\: no such file. + } + } + { + echo Usage: /more + } + } + + + alias less_file + { + @ line = 0 + + while (!eof($0) && (line++ < [$1])) + { + @ ugh = read($0) + if (!eof($0)) + { + echo $ugh + } + } + + if (!eof($0)) + { + @ less.fd = [$0] + @ less.nl = [$1] + input_char "Enter q to quit, or anything else to continue " + { + if ([$0] != [q]) + { + less_file $less.fd $less.nl + } + } + } + { + @ close($fd) + } + } + + #hop'96 diff -rcN ircii-EPIC3.002/script/local.examp ircii-EPIC3.003/script/local.examp *** ircii-EPIC3.002/script/local.examp Tue Sep 3 17:40:34 1996 --- ircii-EPIC3.003/script/local.examp Tue Dec 10 09:48:37 1996 *************** *** 7,13 **** echo *** You are running ircII version $J echo *** echo *** If you see anything you suspect to be a bug, please ! echo *** notify ircii@cris.com immediately for correction. echo *** echo *** End of Message. --- 7,13 ---- echo *** You are running ircII version $J echo *** echo *** If you see anything you suspect to be a bug, please ! echo *** notify ircii-epic@concentric.net immediately for correction. echo *** echo *** End of Message. *************** *** 20,39 **** alias wasteland server undernet.org 6667 alias undernet wasteland - - on ^ctcp ^"% % ERRMSG *no such function*" - on ^dcc_raw ^"% % D %" - - alias locdomain - { - if (!(function_return = after(-2 . $X))) - { - @ function_return = X - } - } - - alias localwho who -host *.$locdomain() - alias return @ function_return = [$*] - alias recho eval echo $* - alias rwhois quote whois $0 $1 - alias o.b @ function_return = (SHOW_NUMERICS==[ON])?H:[***] --- 20,22 ---- diff -rcN ircii-EPIC3.002/script/ls ircii-EPIC3.003/script/ls *** ircii-EPIC3.002/script/ls Wed Sep 18 21:20:21 1996 --- ircii-EPIC3.003/script/ls Thu Dec 12 23:49:53 1996 *************** *** 95,98 **** @ ircii.word = [] } ! #Archon'96 --- 95,98 ---- @ ircii.word = [] } ! #archon'96 diff -rcN ircii-EPIC3.002/script/more ircii-EPIC3.003/script/more *** ircii-EPIC3.002/script/more Tue Sep 3 17:26:22 1996 --- ircii-EPIC3.003/script/more Thu Dec 12 23:50:02 1996 *************** *** 1,6 **** # # A file pager. A demonstration of how to do something useful in ircII. ! # Written by Archon in 1996 # alias more --- 1,6 ---- # # A file pager. A demonstration of how to do something useful in ircII. ! # Written by archon in 1996 # alias more diff -rcN ircii-EPIC3.002/script/repeat ircii-EPIC3.003/script/repeat *** ircii-EPIC3.002/script/repeat Wed Mar 6 13:09:01 1996 --- ircii-EPIC3.003/script/repeat Fri Dec 27 12:24:33 1996 *************** *** 3,18 **** */ /* * Modern format: * Requires: EPIC3pre5 and up * Method: word-selection * Can be called recursively? Yes. */ ! alias repeat { ! stack push assign aaa.r ! fe ($jot(1 $0)) aaa.r { $1- } ! stack pop assign aaa.r ! } /* --- 3,23 ---- */ /* + * REPEAT is now a built in command in EPIC3.003 and up. + * That means you dont need this script any more. + */ + + /* * Modern format: * Requires: EPIC3pre5 and up * Method: word-selection * Can be called recursively? Yes. */ ! :alias repeat { ! : stack push assign aaa.r ! : fe ($jot(1 $0)) aaa.r { $1- } ! : stack pop assign aaa.r ! :} /* *************** *** 55,61 **** * New format: * Requires 2.2pre6 and up * Method: recursion ! * Can be called recursively? No. */ :alias repeat { : if ([$0] > 0) --- 60,66 ---- * New format: * Requires 2.2pre6 and up * Method: recursion ! * Can be called recursively? Yes. */ :alias repeat { : if ([$0] > 0) diff -rcN ircii-EPIC3.002/script/sound ircii-EPIC3.003/script/sound *** ircii-EPIC3.002/script/sound Wed Mar 20 21:59:13 1996 --- ircii-EPIC3.003/script/sound Fri Jan 17 12:30:45 1997 *************** *** 14,21 **** } switch ($3) { ! (*.wav) {exec ${PLAYWAV} $3} ! (*) {exec ${PLAYWAV} $3.wav} } } --- 14,21 ---- } switch ($3) { ! (*.wav) {exec ${PLAYWAV} $^^^;^|^`^!^&^*$3} ! (*) {exec ${PLAYWAV} $^^^;^|^`^!^&^*$3.wav} } } diff -rcN ircii-EPIC3.002/script/spfix ircii-EPIC3.003/script/spfix *** ircii-EPIC3.002/script/spfix Wed Mar 6 13:09:01 1996 --- ircii-EPIC3.003/script/spfix Sat Jan 11 13:29:04 1997 *************** *** 17,20 **** alias spfix { @ function_return = mid(${rindex($right(1 $0) $0)+2} 1024 $0-) } ! #DeadelviS'95 --- 17,20 ---- alias spfix { @ function_return = mid(${rindex($right(1 $0) $0)+2} 1024 $0-) } ! #Crowman'95 diff -rcN ircii-EPIC3.002/script/starutils ircii-EPIC3.003/script/starutils *** ircii-EPIC3.002/script/starutils Tue Sep 3 17:40:05 1996 --- ircii-EPIC3.003/script/starutils Thu Dec 12 23:50:14 1996 *************** *** 1,7 **** ### StarUtils.irc.epic by archon ### January 1996 ### *** REQUIRES AN IRCII-EPIC CLIENT *** ! /* Submitted by Archon on 1/25/96, archon gave me permission to tidy up */ echo [StarUtils] Loading StarUtils v1.2.EPIC by archon - lusers beware - echo [StarUtils] Type /starhelp for help! --- 1,7 ---- ### StarUtils.irc.epic by archon ### January 1996 ### *** REQUIRES AN IRCII-EPIC CLIENT *** ! /* Submitted by archon on 1/25/96, archon gave me permission to tidy up */ echo [StarUtils] Loading StarUtils v1.2.EPIC by archon - lusers beware - echo [StarUtils] Type /starhelp for help! *************** *** 150,153 **** @ $0 = ii = [] } ! #Archon'96 --- 150,153 ---- @ $0 = ii = [] } ! #archon'96 diff -rcN ircii-EPIC3.002/source/alias.c ircii-EPIC3.003/source/alias.c *** ircii-EPIC3.002/source/alias.c Wed Oct 23 23:35:20 1996 --- ircii-EPIC3.003/source/alias.c Fri Jan 17 21:04:30 1997 *************** *** 224,229 **** --- 224,230 ---- *function_which _((char *)), *function_winserv _((char *)), *function_winsize _((char *)), + *function_winvisible _((char *)), *function_write _((char *)), *function_writeb _((char *)); *************** *** 231,238 **** typedef char *(bf) _((char *)); typedef struct { ! char *name; ! bf *func; } BuiltInFunctions; --- 232,239 ---- typedef char *(bf) _((char *)); typedef struct { ! const char *name; ! bf *func; } BuiltInFunctions; *************** *** 377,382 **** --- 378,384 ---- { "WINNUM", function_winnum }, { "WINSERV", function_winserv }, { "WINSIZE", function_winsize }, + { "WINVISIBLE", function_winvisible }, { "WORD", function_word }, { "WRITE", function_write }, { "WRITEB", function_writeb }, *************** *** 688,693 **** --- 690,696 ---- } malloc_strcpy(&(tmp->name), name); malloc_strcpy(&(tmp->stuff), stuff); + new_free(&tmp->stub); tmp->mark = 0; tmp->global = loading_global; insert_alias(&(alias_list[type]), tmp); *************** *** 2073,2078 **** --- 2076,2082 ---- #endif { char *tmp, + *tmp2, c; int upper, lower, *************** *** 2226,2238 **** else upper = lower; } ! /* not attached, so dont "fix" it. */ ! { ! char *tmp2 = extract2(args, lower, upper); ! TruncateAndQuote(buffer, tmp2, length, quote_em); ! new_free(&tmp2); ! return (ptr ? ptr : empty_string); ! } } else { --- 2230,2253 ---- else upper = lower; } ! ! /* ! * Protect against a crash. There ! * are some gross syntactic errors ! * that can be made that will result ! * in ''args'' being NULL here. That ! * will crash the client, so we have ! * to protect against that by simply ! * chewing the expando. ! */ ! if (!args) ! tmp2 = m_strdup(empty_string); ! else ! tmp2 = extract2(args, lower, upper); ! ! TruncateAndQuote(buffer, tmp2, length, quote_em); ! new_free(&tmp2); ! return (ptr ? ptr : empty_string); } else { *************** *** 2891,2896 **** --- 2906,2912 ---- * the command part of ASSIGN is "1" in the * command array list */ + if ((name = next_arg(args, &rest)) != NULL) { /* XXXX - How about calling remove_brackets() here? */ *************** *** 2906,2912 **** else break; } ! /* Crowman reported this bug -- why the heck dont we strip off spaces * between the alias name and its first argument? (???) (E3P3.3, fall 1995) */ while (my_isspace(*rest)) --- 2922,2929 ---- else break; } ! /* ! * Crowman reported this bug -- why the heck dont we strip off spaces * between the alias name and its first argument? (???) (E3P3.3, fall 1995) */ while (my_isspace(*rest)) *************** *** 2928,2933 **** --- 2945,2958 ---- if (*ptr) say("Junk after closing brace in ALIAS or ASSIGN"); + /* + * This fixes a rather obscure bug + * with /alias foobar { @ bar = 1 } + * being mis-interpreted. + */ + while (*rest && my_isspace(*rest)) + rest++; + add_alias(type, name, rest); } } *************** *** 3023,3030 **** static char *alias_time _((void)) { return m_strdup(update_clock(GET_TIME)); } static char *alias_dollar _((void)) { return m_strdup("$"); } static char *alias_detected _((void)) { return m_strdup(last_notify_nick); } ! static char *alias_nick _((void)) { return m_strdup(get_server_nickname(curr_scr_win->server)); } ! static char *alias_away _((void)) { return m_strdup(server_list[curr_scr_win->server].away ? server_list[curr_scr_win->server].away : empty_string); } static char *alias_sent_nick _((void)) { return m_strdup((sent_nick) ? sent_nick : empty_string); } static char *alias_recv_nick _((void)) { return m_strdup((recv_nick) ? recv_nick : empty_string); } static char *alias_msg_body _((void)) { return m_strdup((sent_body) ? sent_body : empty_string); } --- 3048,3055 ---- static char *alias_time _((void)) { return m_strdup(update_clock(GET_TIME)); } static char *alias_dollar _((void)) { return m_strdup("$"); } static char *alias_detected _((void)) { return m_strdup(last_notify_nick); } ! static char *alias_nick _((void)) { return m_strdup((curr_scr_win->server != -1) ? get_server_nickname(curr_scr_win->server) : empty_string); } ! static char *alias_away _((void)) { return m_strdup((curr_scr_win->server != -1) ? server_list[curr_scr_win->server].away ? server_list[curr_scr_win->server].away : empty_string : empty_string); } static char *alias_sent_nick _((void)) { return m_strdup((sent_nick) ? sent_nick : empty_string); } static char *alias_recv_nick _((void)) { return m_strdup((recv_nick) ? recv_nick : empty_string); } static char *alias_msg_body _((void)) { return m_strdup((sent_body) ? sent_body : empty_string); } *************** *** 3033,3039 **** static char *alias_show_realname _((void)) { return m_strdup(realname); } static char *alias_version_str _((void)) { return m_strdup(irc_version); } static char *alias_invite _((void)) { return m_strdup((invite_channel) ? invite_channel : empty_string); } ! static char *alias_oper _((void)) { return m_strdup(get_server_operator(from_server) ? get_string_var(STATUS_OPER_VAR) : empty_string); } static char *alias_version _((void)) { return m_strdup(internal_version); } static char *alias_online _((void)) { return m_sprintf("%ld",(long)start_time); } static char *alias_idle _((void)) { return m_sprintf("%ld",time(NULL)-idle_time); } --- 3058,3064 ---- static char *alias_show_realname _((void)) { return m_strdup(realname); } static char *alias_version_str _((void)) { return m_strdup(irc_version); } static char *alias_invite _((void)) { return m_strdup((invite_channel) ? invite_channel : empty_string); } ! static char *alias_oper _((void)) { return m_strdup((from_server != -1) ? get_server_operator(from_server) ? get_string_var(STATUS_OPER_VAR) : empty_string : empty_string); } static char *alias_version _((void)) { return m_strdup(internal_version); } static char *alias_online _((void)) { return m_sprintf("%ld",(long)start_time); } static char *alias_idle _((void)) { return m_sprintf("%ld",time(NULL)-idle_time); } *************** *** 3100,3106 **** static char *alias_server_version _((void)) { char *s; ! return m_strdup((s = server_list[curr_scr_win->server].version_string) ? s : empty_string); } --- 3125,3131 ---- static char *alias_server_version _((void)) { char *s; ! return m_strdup((curr_scr_win->server) ? (s = server_list[curr_scr_win->server].version_string) ? s : empty_string : empty_string); } *************** *** 5014,5038 **** while (*++word) m_3cat(&aboo, space, ltoa((long) *word)); ! return aboo; /* XXXX - Memory leak detected here */ } BUILT_IN_FUNCTION(function_which, word) { char *file1; FILE *fp; GET_STR_ARG(file1, word); file1 = m_strdup(file1); if ((fp = uzfopen (&file1, (word && *word) ? word : get_string_var(LOAD_PATH_VAR)))) { fclose (fp); return (file1); } else { new_free(&file1); RETURN_EMPTY; } } --- 5039,5069 ---- while (*++word) m_3cat(&aboo, space, ltoa((long) *word)); ! return aboo; } BUILT_IN_FUNCTION(function_which, word) { char *file1; FILE *fp; + int old_window_display; GET_STR_ARG(file1, word); file1 = m_strdup(file1); + old_window_display = window_display; + window_display = 0; + if ((fp = uzfopen (&file1, (word && *word) ? word : get_string_var(LOAD_PATH_VAR)))) { fclose (fp); + window_display = old_window_display; return (file1); } else { new_free(&file1); + window_display = old_window_display; RETURN_EMPTY; } } *************** *** 5751,5757 **** if (num < 1) RETURN_EMPTY; ! final = (char *)new_malloc(strlen(words) * num); *final = 0; for (; num > 0; num--) strcat(final, words); --- 5782,5788 ---- if (num < 1) RETURN_EMPTY; ! final = (char *)new_malloc(strlen(words) * num + 1); *final = 0; for (; num > 0; num--) strcat(final, words); *************** *** 5950,5961 **** BUILT_IN_FUNCTION(function_chmod, words) { char *filearg, *after; ! int fd; mode_t perm; GET_STR_ARG(filearg, words); fd = (int) strtoul(filearg, &after, 10); ! GET_INT_ARG(perm, words); if (after != words && *after == 0) { --- 5981,5994 ---- BUILT_IN_FUNCTION(function_chmod, words) { char *filearg, *after; ! int fd = -1; ! char *perm_s; mode_t perm; GET_STR_ARG(filearg, words); fd = (int) strtoul(filearg, &after, 10); ! GET_STR_ARG(perm_s, words); ! perm = (mode_t) strtol(perm_s, &perm_s, 8); if (after != words && *after == 0) { *************** *** 5980,5986 **** /* * Date: Sun, 29 Sep 1996 19:17:25 -0700 * Author: Thomas Morgan ! * Submitted-by: Archon * * $uniq (string of text) * Given a set of words, returns a new set of words with duplicates --- 6013,6019 ---- /* * Date: Sun, 29 Sep 1996 19:17:25 -0700 * Author: Thomas Morgan ! * Submitted-by: archon * * $uniq (string of text) * Given a set of words, returns a new set of words with duplicates *************** *** 6028,6030 **** --- 6061,6069 ---- return (booya); /* DONT USE RETURN_STR HERE! */ } + + BUILT_IN_FUNCTION(function_winvisible, word) + { + RETURN_INT(get_visible_by_refnum(word)) + } + diff -rcN ircii-EPIC3.002/source/ctcp.c ircii-EPIC3.003/source/ctcp.c *** ircii-EPIC3.002/source/ctcp.c Mon Sep 30 22:28:50 1996 --- ircii-EPIC3.003/source/ctcp.c Mon Nov 25 16:02:51 1996 *************** *** 146,159 **** */ int in_ctcp_flag = 0; - /* - * ctcp_last_reply_time: Used to stop flooding... We only send one ctcp - * reply a second.. if the variable NOCTCP_FLOOD is set... If the current - * second is still the same, we drop the request, and info the user. - */ - time_t ctcp_last_reply_time = 0; - int not_warned = 0; - #ifdef __STDC__ #define CTCP_HANDLER(x) \ static char * x (CtcpEntry *ctcp, char *from, char *to, char *cmd) --- 146,151 ---- *************** *** 676,682 **** ctcp_command, from, to, *ctcp_argument ? ": " : empty_string, ctcp_argument); } ! time(&ctcp_last_reply_time); allow_ctcp_reply = 0; continue; } --- 668,674 ---- ctcp_command, from, to, *ctcp_argument ? ": " : empty_string, ctcp_argument); } ! time(&last_ctcp_parsed); allow_ctcp_reply = 0; continue; } *************** *** 695,701 **** */ if (!(ctcp_cmd[i].flag & CTCP_NOLIMIT)) { ! time(&ctcp_last_reply_time); allow_ctcp_reply = 0; } --- 687,693 ---- */ if (!(ctcp_cmd[i].flag & CTCP_NOLIMIT)) { ! time(&last_ctcp_parsed); allow_ctcp_reply = 0; } diff -rcN ircii-EPIC3.002/source/dcc.c ircii-EPIC3.003/source/dcc.c *** ircii-EPIC3.002/source/dcc.c Mon Oct 14 12:58:51 1996 --- ircii-EPIC3.003/source/dcc.c Thu Dec 12 08:22:46 1996 *************** *** 400,406 **** struct sockaddr_in remaddr; struct in_addr myip; int rl = sizeof(remaddr); ! int old_server; #ifdef MIRC_BROKEN_DCC_RESUME char buf[10]; #endif --- 400,406 ---- struct sockaddr_in remaddr; struct in_addr myip; int rl = sizeof(remaddr); ! int old_server, jvs_blah; #ifdef MIRC_BROKEN_DCC_RESUME char buf[10]; #endif *************** *** 434,442 **** getpeername(Client->read, (struct sockaddr *) &remaddr, &rl); if ((Client->flags & DCC_TYPES) != DCC_RAW) { ! if (do_hook(DCC_CONNECT_LIST,"%s %s %s %d", ! user, Type, inet_ntoa(remaddr.sin_addr), ! ntohs(remaddr.sin_port))) say("DCC %s connection with %s[%s %d] established", Type, user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); --- 434,456 ---- getpeername(Client->read, (struct sockaddr *) &remaddr, &rl); if ((Client->flags & DCC_TYPES) != DCC_RAW) { ! /* It would be nice if SEND also showed the filename ! and size (since it's possible to have multiple ! SEND requests queued), so we check for a file size ! first. */ ! if ( Client->filesize ) ! jvs_blah = do_hook(DCC_CONNECT_LIST, ! "%s %s %s %d %s %d", user, Type, ! inet_ntoa(Client->remote), ! ntohs(Client->remport), ! Client->description, ! Client->filesize); ! else ! jvs_blah = do_hook(DCC_CONNECT_LIST, ! "%s %s %s %d", user, Type, ! inet_ntoa(Client->remote), ! ntohs(Client->remport)); ! if ( jvs_blah ) say("DCC %s connection with %s[%s %d] established", Type, user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); *************** *** 1225,1231 **** #endif { DCC_list * Client; ! int CType; char * c; u_long TempLong; unsigned TempInt; --- 1239,1245 ---- #endif { DCC_list * Client; ! int CType, jvs_blah; char * c; u_long TempLong; unsigned TempInt; *************** *** 1369,1376 **** say("DCC CHAT already requested by %s, connecting...", user); dcc_chat(user); } ! else if (do_hook(DCC_REQUEST_LIST,"%s %s %s %d",user, type, description, Client->filesize)) ! { /* These should be more helpful messages now. */ /* WC asked to have them moved here */ if (Client->flags & DCC_FILEREAD) --- 1383,1411 ---- say("DCC CHAT already requested by %s, connecting...", user); dcc_chat(user); } ! else ! { ! /* DCC SEND and CHAT have different arguments, so they can't ! very well use the exact same hooked data. Both now are ! identical for $0-4, and SEND adds filename/size in $5-6 */ ! if ( Client->filesize ) ! jvs_blah = do_hook(DCC_REQUEST_LIST, ! "%s %s %s %s %d %s %d", ! user, type, description, ! inet_ntoa(Client->remote), ! ntohs(Client->remport), ! Client->description, ! Client->filesize); ! else ! jvs_blah = do_hook(DCC_REQUEST_LIST, ! "%s %s %s %s %d", ! user, type, description, ! inet_ntoa(Client->remote), ! ntohs(Client->remport)); ! ! /* indentation broken 22 Nov 96, crowman... eeeeyuck */ ! if ( jvs_blah ) ! { /* These should be more helpful messages now. */ /* WC asked to have them moved here */ if (Client->flags & DCC_FILEREAD) *************** *** 1426,1433 **** say("DCC %s (%s) request received from %s!%s [%s:%d]", type, description, user, FromUserHost, inet_ntoa(Client->remote), ntohs(Client->remport)); ! } ! return; } --- 1461,1469 ---- say("DCC %s (%s) request received from %s!%s [%s:%d]", type, description, user, FromUserHost, inet_ntoa(Client->remote), ntohs(Client->remport)); ! } ! return; ! } } *************** *** 1533,1539 **** Client->flags &= ~DCC_WAIT; Client->flags |= DCC_ACTIVE; if (do_hook(DCC_CONNECT_LIST, "%s CHAT %s %d", Client->user, ! inet_ntoa(remaddr.sin_addr)), ntohs(remaddr.sin_port)) say("DCC chat connection to %s[%s,%d] established", Client->user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); get_time(&Client->starttime); --- 1569,1575 ---- Client->flags &= ~DCC_WAIT; Client->flags |= DCC_ACTIVE; if (do_hook(DCC_CONNECT_LIST, "%s CHAT %s %d", Client->user, ! inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port))) say("DCC chat connection to %s[%s,%d] established", Client->user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); get_time(&Client->starttime); *************** *** 1798,1805 **** Client->flags |= DCC_ACTIVE; get_time(&Client->starttime); ! if (do_hook(DCC_CONNECT_LIST,"%s SEND %s %d",Client->user, ! inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port))) say("DCC SEND connection to %s[%s,%d] established", Client->user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); --- 1834,1843 ---- Client->flags |= DCC_ACTIVE; get_time(&Client->starttime); ! if (do_hook(DCC_CONNECT_LIST, "%s SEND %s %d %s %d", ! Client->user, inet_ntoa(remaddr.sin_addr), ! ntohs(remaddr.sin_port), Client->description, ! Client->filesize)) say("DCC SEND connection to %s[%s,%d] established", Client->user, inet_ntoa(remaddr.sin_addr), ntohs(remaddr.sin_port)); diff -rcN ircii-EPIC3.002/source/edit.c ircii-EPIC3.003/source/edit.c *** ircii-EPIC3.002/source/edit.c Sat Nov 2 21:38:16 1996 --- ircii-EPIC3.003/source/edit.c Tue Jan 14 13:26:44 1997 *************** *** 128,133 **** --- 128,134 ---- static void e_channel _((char *, char *, char *)); static void e_nick _((char *, char *, char *)); static void e_privmsg _((char *, char *, char *)); + static void e_pause _((char *, char *, char *)); static void e_quit _((char *, char *, char *)); static void e_wallop _((char *, char *, char *)); static void evalcmd _((char *, char *, char *)); *************** *** 245,252 **** { "IF", "IF", ifcmd, 0 }, /* if.c */ { "IGNORE", NULL, ignore, 0 }, /* ignore.c */ { "INFO", "INFO", info, 0 }, ! { "INPUT", NULL, inputcmd, 0 }, { "INVITE", "INVITE", send_comm, 0 }, { "IRCNAME", NULL, realname_cmd, 0 }, { "IRCUSER", NULL, set_username, 0 }, { "ISON", "ISON", ison, 0 }, --- 246,255 ---- { "IF", "IF", ifcmd, 0 }, /* if.c */ { "IGNORE", NULL, ignore, 0 }, /* ignore.c */ { "INFO", "INFO", info, 0 }, ! { "INPUT", "INPUT", inputcmd, 0 }, ! { "INPUT_CHAR", "INPUT_CHAR", inputcmd, 0 }, { "INVITE", "INVITE", send_comm, 0 }, + { "IRCHOST", "HOSTNAME", e_hostname, 0 }, { "IRCNAME", NULL, realname_cmd, 0 }, { "IRCUSER", NULL, set_username, 0 }, { "ISON", "ISON", ison, 0 }, *************** *** 254,260 **** { "KICK", "KICK", send_kick, 0 }, { "KILL", "KILL", send_2comm, 0 }, { "LASTLOG", NULL, lastlog, 0 }, /* lastlog.c */ ! { "LEAVE", "PART", send_channel_com, 0 }, { "LINKS", "LINKS", send_comm, NONOVICEABBREV}, { "LIST", "LIST", funny_stuff, 0 }, { "LOAD", "LOAD", load, 0 }, --- 257,263 ---- { "KICK", "KICK", send_kick, 0 }, { "KILL", "KILL", send_2comm, 0 }, { "LASTLOG", NULL, lastlog, 0 }, /* lastlog.c */ ! { "LEAVE", "PART", send_2comm, 0 }, { "LINKS", "LINKS", send_comm, NONOVICEABBREV}, { "LIST", "LIST", funny_stuff, 0 }, { "LOAD", "LOAD", load, 0 }, *************** *** 275,281 **** { "ON", NULL, on, 0 }, /* hook.c */ { "OPER", "OPER", oper, 0 }, { "PARSEKEY", NULL, parsekeycmd, 0 }, ! { "PART", "PART", send_channel_com, 0 }, { "PING", NULL, pingcmd, 0 }, { "POP", NULL, pop_cmd, 0 }, { "PRETEND", NULL, pretend_cmd, 0 }, --- 278,285 ---- { "ON", NULL, on, 0 }, /* hook.c */ { "OPER", "OPER", oper, 0 }, { "PARSEKEY", NULL, parsekeycmd, 0 }, ! { "PART", "PART", send_2comm, 0 }, ! { "PAUSE", NULL, e_pause, 0 }, { "PING", NULL, pingcmd, 0 }, { "POP", NULL, pop_cmd, 0 }, { "PRETEND", NULL, pretend_cmd, 0 }, *************** *** 289,294 **** --- 293,299 ---- { "RECONNECT", NULL, reconnect_cmd, 0 }, { "REDIRECT", NULL, redirect, 0 }, { "REHASH", "REHASH", send_comm, 0 }, + { "REPEAT", "REPEAT", repeatcmd, 0 }, { "RESTART", "RESTART", send_comm, 0 }, { "RPING", "RPING", send_comm, 0 }, { "SAVE", NULL, save_settings, 0 }, *************** *** 576,590 **** BUILT_IN_COMMAND(disconcmd) { ! int server_number; ! ! if ((server_number = from_server) == -1) { say("Cannot disconnect: You are not connected."); return; } ! say("Disconnecting from server %d", server_number); ! close_server(server_number,empty_string); clean_whois_queue(); window_check_servers(); if (!connected_to_server) --- 581,596 ---- BUILT_IN_COMMAND(disconcmd) { ! if (from_server == -1) { say("Cannot disconnect: You are not connected."); return; } ! ! say("Disconnecting from server %d", from_server); ! if (!args || !*args) ! args = "Reconnecting"; ! close_server(from_server, args); clean_whois_queue(); window_check_servers(); if (!connected_to_server) *************** *** 671,676 **** --- 677,723 ---- } /* + * This is a quick and dirty hack (emphasis on dirty) that i whipped up + * just for the heck of it. I feel really dirty about using the add_timer + * call (bletch!) to fake a timeout for io(). The better answer would be + * for io() to take an argument specifying the maximum threshold for a + * timeout, but i didnt want to deal with that here. So i just add a + * dummy timer event that does nothing (wasting two function calls and + * about 20 bytes of memory), and call io() until the whole thing blows + * over. Nice and painless. You might want to try this instead of /sleep, + * since this is (obviously) non-blocking. This also calls time() for every + * io event, so that might also start adding up. Oh well, TIOLI. + * + * Without an argument, it waits for the user to press a key. Any key. + * and the key is accepted. Thats probably not right, ill work on that. + */ + BUILT_IN_COMMAND(e_pause) + { + char *sec; + int seconds; + time_t start; + + if (!(sec = next_arg(args, &args))) + { + cursor_to_input(); + get_a_char(); + input_backspace(0, NULL); /* XXXX */ + return; + } + + seconds = atoi(sec); + time(&start); + + /* + * I use comment here simply becuase its not going to mess + * with the arguments. + */ + add_timer("", seconds, (int (*)(void *))comment, NULL, NULL); + while (time(NULL) < start + seconds) + io(); + } + + /* * e_privmsg: The MSG command, displaying a message on the screen indicating * the message was sent. Also, this works for the NOTICE command. */ *************** *** 699,704 **** --- 746,752 ---- else if (!strcmp(nick, "*") && (!(nick = get_channel_by_refnum(0)))) nick = "0"; send_text(nick, args, command, 1); + malloc_strcpy(&sent_body, args); } else say("Usage: %s ", command); *************** *** 926,953 **** say("Usage: /HOOK [text]"); } BUILT_IN_COMMAND(e_hostname) { ! char *newname; ! struct hostent *hp; ! ! if ((newname = next_arg(args, &args))) { ! if ((hp = gethostbyname(newname)) == NULL) ! { ! /* Cant use 'say' if the window isnt set up, */ ! if (command) ! say("Cannot change to an invalid hostname"); ! return; ! } ! /* ! * We should check here to make sure this hostname ! * really is us. ! */ ! strmcpy(MyHostName, newname, 79); ! bcopy(hp->h_addr, (char *)&MyHostAddr, sizeof(MyHostAddr)); ! local_ip_address.s_addr = ntohl(MyHostAddr.s_addr); } } --- 974,998 ---- say("Usage: /HOOK [text]"); } + /* + * Modified /hostname by Thomas Morgan (tmorgan@pobox.com) + */ BUILT_IN_COMMAND(e_hostname) { ! if (args && *args) { ! struct hostent *hp; ! ! malloc_strcpy(&LocalHostName, args); ! ! if ((hp = gethostbyname(LocalHostName))) ! bcopy(hp->h_addr, (void *)&LocalHostAddr, sizeof(LocalHostAddr)); ! ! say("Local host name is now %s", LocalHostName); } + else + say("Local Host name is %s", + (LocalHostName) ? LocalHostName : hostname); } *************** *** 977,983 **** say("The EPIC Project:"); say(" \tJeremy Nelson "); say(" \tJake Khuon "); ! say(" \tRobert Chady "); say(" \tJames Sneeringer "); say(" \tMurple "); say(" \tScott Kilau "); --- 1022,1028 ---- say("The EPIC Project:"); say(" \tJeremy Nelson "); say(" \tJake Khuon "); ! say(" \tRobert Chady "); say(" \tJames Sneeringer "); say(" \tMurple "); say(" \tScott Kilau "); *************** *** 1021,1026 **** --- 1066,1072 ---- BUILT_IN_COMMAND(inputcmd) { char *prompt; + int wait_type; if (!args || !*args) return; *************** *** 1043,1049 **** for (; *args == ' '; args++) ; ! add_wait_prompt(prompt, eval_inputlist, args, WAIT_PROMPT_LINE); } #ifdef __STDC__ --- 1089,1100 ---- for (; *args == ' '; args++) ; ! if (!strcmp(command, "INPUT")) ! wait_type = WAIT_PROMPT_LINE; ! else ! wait_type = WAIT_PROMPT_KEY; ! ! add_wait_prompt(prompt, eval_inputlist, args, wait_type); } #ifdef __STDC__ *************** *** 1264,1270 **** && (ptr == start) #endif #endif ! && (get_int_var(COMMENT_HACK_VAR) && ptr == start) ) { /* Yep. its the start of a comment. */ --- 1315,1321 ---- && (ptr == start) #endif #endif ! && (!get_int_var(COMMENT_HACK_VAR) || ptr == start) ) { /* Yep. its the start of a comment. */ *************** *** 1605,1611 **** !in_on_who && !doing_privmsg && #endif args && *args) ! send_to_server("%1024s", args); } /* This code is courtesy of Richie B. (richie@morra.et.tudelft.nl) */ --- 1656,1662 ---- !in_on_who && !doing_privmsg && #endif args && *args) ! send_to_server("%s", args); } /* This code is courtesy of Richie B. (richie@morra.et.tudelft.nl) */ *************** *** 1632,1650 **** */ BUILT_IN_COMMAND(reconnect_cmd) { - int server_number=from_server; char scommnd[4]; ! if (server_number == -1) { say("Reconnect to what server? (You're not connected)"); return; } ! say("Reconnecting to server %d", server_number); ! sprintf(scommnd, "+%i", server_number); ! close_server(server_number,empty_string); clean_whois_queue(); window_check_servers(); ! server( NULL, scommnd, empty_string ); } /* End of contributed code */ --- 1683,1703 ---- */ BUILT_IN_COMMAND(reconnect_cmd) { char scommnd[4]; ! ! if (from_server == -1) { say("Reconnect to what server? (You're not connected)"); return; } ! say("Reconnecting to server %d", from_server); ! sprintf(scommnd, "+%i", from_server); ! if (!args || !*args) ! args = "Reconnecting"; ! close_server(from_server, args); clean_whois_queue(); window_check_servers(); ! server(NULL, scommnd, empty_string); } /* End of contributed code */ diff -rcN ircii-EPIC3.002/source/funny.c ircii-EPIC3.003/source/funny.c *** ircii-EPIC3.002/source/funny.c Sat Mar 23 15:10:33 1996 --- ircii-EPIC3.003/source/funny.c Mon Dec 30 16:25:50 1996 *************** *** 388,443 **** { int onoff = 1; ! while (*modes) { ! switch(*modes++) { ! case '-': ! onoff=0; ! break; ! case '+': ! onoff=1; ! break; ! case 'c': ! case 'C': ! set_server_flag(from_server, USER_MODE_C, onoff); ! break; ! case 'd': ! case 'D': ! set_server_flag(from_server, USER_MODE_D, onoff); ! break; ! case 'f': ! case 'F': ! set_server_flag(from_server, USER_MODE_F, onoff); ! break; ! case 'i': ! case 'I': ! set_server_flag(from_server, USER_MODE_I, onoff); ! break; ! case 'k': ! case 'K': ! set_server_flag(from_server, USER_MODE_K, onoff); ! break; ! case 'o': ! case 'O': ! set_server_operator(from_server, onoff); ! break; ! case 'r': ! case 'R': ! set_server_flag(from_server, USER_MODE_R, onoff); ! break; ! case 's': ! case 'S': ! set_server_flag(from_server, USER_MODE_S, onoff); ! break; ! case 'u': ! case 'U': ! set_server_flag(from_server, USER_MODE_U, onoff); ! break; ! case 'w': ! case 'W': ! set_server_flag(from_server, USER_MODE_W, onoff); ! break; } } } --- 388,410 ---- { int onoff = 1; ! for (; *modes; modes++) { ! if (*modes == '-') ! onoff = 0; ! else if (*modes == '+') ! onoff = 1; ! ! else if ((*modes >= 'a' && *modes <= 'z') ! || (*modes >= 'A' && *modes <= 'Z')) { ! char c = tolower(*modes); ! size_t idx = (size_t) (index(umodes, c) - umodes); ! ! set_server_flag(from_server, USER_MODES << idx, onoff); ! ! if (c == 'o') ! set_server_operator(from_server, onoff); } } } diff -rcN ircii-EPIC3.002/source/help.c ircii-EPIC3.003/source/help.c *** ircii-EPIC3.002/source/help.c Tue Sep 17 14:44:41 1996 --- ircii-EPIC3.003/source/help.c Wed Dec 4 23:03:55 1996 *************** *** 169,175 **** { Window *old_window; int rows = 0; ! char line[81]; if (window) { --- 169,175 ---- { Window *old_window; int rows = 0; ! char line[256]; if (window) { *************** *** 187,193 **** while (--rows) { ! if (fgets(line, 80, help_fp)) { if (*(line + strlen(line) - 1) == '\n') *(line + strlen(line) - 1) = (char) 0; --- 187,193 ---- while (--rows) { ! if (fgets(line, 255, help_fp)) { if (*(line + strlen(line) - 1) == '\n') *(line + strlen(line) - 1) = (char) 0; diff -rcN ircii-EPIC3.002/source/if.c ircii-EPIC3.003/source/if.c *** ircii-EPIC3.002/source/if.c Fri Sep 13 18:30:31 1996 --- ircii-EPIC3.003/source/if.c Fri Dec 27 12:16:08 1996 *************** *** 673,675 **** --- 673,722 ---- } } + #ifdef __STDC__ + void repeatcmd(char *command, char *args, char *subargs) + #else + void repeatcmd (command, args, subargs) + char *command, *args, *subargs; + #endif + { + char *num_expr = NULL; + int value; + + while (isspace(*args)) + args++; + + if (*args == '(') + { + char *tmp_val; + char *dumb_copy; + int argsused; + char *sa = subargs ? subargs : empty_string; + + num_expr = next_expr(&args, '('); + dumb_copy = m_strdup(num_expr); + + tmp_val = parse_inline(dumb_copy,sa,&argsused); + value = atoi(tmp_val); + new_free(&tmp_val); + new_free(&dumb_copy); + } + else + { + char *tmp_val; + int af; + + num_expr = new_next_arg(args, &args); + tmp_val = expand_alias(NULL, num_expr, subargs, &af, NULL); + value = atoi(tmp_val); + new_free(&tmp_val); + } + + if (value <= 0) + return; + + while (value--) + parse_line(NULL, args, subargs, 0, 0); + + return; + } diff -rcN ircii-EPIC3.002/source/input.c ircii-EPIC3.003/source/input.c *** ircii-EPIC3.002/source/input.c Thu May 9 07:39:26 1996 --- ircii-EPIC3.003/source/input.c Fri Jan 3 01:30:01 1997 *************** *** 1097,1102 **** --- 1097,1106 ---- *str; #endif { + /* Paranoia */ + if (!str) + return; + for (; *str; str++) input_add_character(*str, empty_string); } *************** *** 1148,1161 **** char *ptr = NULL; u_char extended_key; WaitPrompt *oldprompt; ! int meta_hit = 0, meta_not_hit; ! int i; /* were we waiting for a keypress? */ if (current_screen->promptlist && current_screen->promptlist->type == WAIT_PROMPT_KEY) { oldprompt = current_screen->promptlist; ! (*oldprompt->func)(oldprompt->data, &key); set_input(empty_string); current_screen->promptlist = oldprompt->next; new_free(&oldprompt->data); --- 1152,1168 ---- char *ptr = NULL; u_char extended_key; WaitPrompt *oldprompt; ! int meta_hit = 0, ! meta_not_hit; ! int i; ! u_char dummy[2]; /* were we waiting for a keypress? */ if (current_screen->promptlist && current_screen->promptlist->type == WAIT_PROMPT_KEY) { + dummy[0] = key, dummy[1] = 0; oldprompt = current_screen->promptlist; ! (*oldprompt->func)(oldprompt->data, dummy); set_input(empty_string); current_screen->promptlist = oldprompt->next; new_free(&oldprompt->data); diff -rcN ircii-EPIC3.002/source/irc.c ircii-EPIC3.003/source/irc.c *** ircii-EPIC3.002/source/irc.c Fri Nov 1 19:15:12 1996 --- ircii-EPIC3.003/source/irc.c Fri Jan 17 12:40:40 1997 *************** *** 13,25 **** /* * irc_version is what $J returns, its the common-name for the version. */ ! const char irc_version[] = "2.8.2-EPIC3.002"; /* * internal_version is what $V returns, its the integer-id for the * version, and corresponds to the date of release, YYYYMMDD. ! */ ! const char internal_version[] = "19961101"; #include --- 13,25 ---- /* * irc_version is what $J returns, its the common-name for the version. */ ! const char irc_version[] = "2.8.2-EPIC3.003"; /* * internal_version is what $V returns, its the integer-id for the * version, and corresponds to the date of release, YYYYMMDD. ! */ ! const char internal_version[] = "19970117"; #include *************** *** 67,141 **** #include "mail.h" #include "timer.h" ! int irc_port = IRC_PORT, /* port of ircd */ ! current_on_hook = -1, /* Used to check for ON */ use_flow_control = USE_FLOW_CONTROL, /* true: ^Q/^S used for flow * cntl */ ! current_numeric, /* this is negative of the ! * current numeric! */ ! dumb = 0, /* if true, IRCII is put in ! * "dumb" mode */ ! no_fork = 0, /* if true, IRCII won't with ! * -b or -e */ ! background = 0, /* if true, ircII will fork */ ! use_input = 1, /* if 0, stdin is never ! * checked */ ! waiting = 0, /* used by /WAIT command */ ! key_pressed = 0, /* set to one when a key is ! * pressed. if you set this ! * to zero and call io(), ! * when it pops back to one, ! * you know a key was pressed ! * ok? */ ! who_mask = 0; /* keeps track of which /who ! * switchs are set */ ! ! char oper_command = 0; /* true just after an oper() command is ! * given. Used to tell the difference ! * between an incorrect password generated by ! * an oper() command and one generated when ! * connecting to a new server */ ! char global_all_off[2]; /* lame kludge to get around lameness */ ! char MyHostName[80]; /* The local machine name. Used by * DCC TALK */ ! struct in_addr MyHostAddr; /* The local machine address */ ! struct in_addr local_ip_address; /* Sometimes the same, sometimes not */ extern char *last_away_nick; ! char *invite_channel = (char *) 0, /* last channel of an INVITE */ ! *ircrc_file = (char *) 0, /* full path .ircrc file */ ! *my_path = (char *) 0, /* path to users home dir */ ! *irc_path = (char *) 0, /* paths used by /load */ ! *irc_lib = (char *) 0, /* path to the ircII library */ #ifdef ALLOW_LONG_NICKNAMES ! nickname[LONG_NICKNAME_LEN + 1], #else ! nickname[NICKNAME_LEN + 1], /* users nickname */ #endif ! hostname[NAME_LEN + 1], /* name of current host */ ! realname[REALNAME_LEN + 1], /* real name of user */ ! username[NAME_LEN + 1], /* usernameof user */ ! *send_umode = NULL, /* sent umode */ ! *last_notify_nick = (char *) 0, /* last detected nickname */ ! empty_string[] = "", /* just an empty string */ ! space[] = " ", /* just a lonely space */ ! *who_name = (char *) 0, /* extra /who switch info */ ! *who_file = (char *) 0, /* extra /who switch info */ ! *who_server = (char *) 0, /* extra /who switch info */ ! *who_host = (char *) 0, /* extra /who switch info */ ! *who_nick = (char *) 0, /* extra /who switch info */ ! *who_real = (char *) 0, /* extra /who switch info */ ! *cannot_open = (char *) 0, /* extra /who switch info */ ! *cut_buffer = (char *) 0; /* global cut_buffer */ ! int away_set = 0, /* set if there is an away * message anywhere */ ! quick_startup = 0; /* set if we ignore .ircrc */ ! time_t idle_time = 0, /* amount of time we've been idle */ ! start_time; /* the time when we booted up */ ! fd_set readables, writables; ! int child_dead = 0; /* global function delcarations */ --- 67,144 ---- #include "mail.h" #include "timer.h" ! int irc_port = IRC_PORT, /* port of ircd */ ! current_on_hook = -1, /* Used to check for ON */ use_flow_control = USE_FLOW_CONTROL, /* true: ^Q/^S used for flow * cntl */ ! current_numeric, /* this is negative of the ! * current numeric! */ ! dumb = 0, /* if true, IRCII is put in ! * "dumb" mode */ ! no_fork = 0, /* if true, IRCII won't with ! * -b or -e */ ! background = 0, /* if true, ircII will fork */ ! use_input = 1, /* if 0, stdin is never ! * checked */ ! waiting = 0, /* used by /WAIT command */ ! key_pressed = 0, /* set to one when a key is ! * pressed. if you set this ! * to zero and call io(), ! * when it pops back to one, ! * you know a key was pressed ! * ok? */ ! who_mask = 0; /* keeps track of which /who ! * switchs are set */ ! ! char oper_command = 0; /* true just after an oper() command is ! * given. Used to tell the difference ! * between an incorrect password generated by ! * an oper() command and one generated when ! * connecting to a new server */ ! char global_all_off[2]; /* lame kludge to get around lameness */ ! char MyHostName[80]; /* The local machine name. Used by * DCC TALK */ ! struct in_addr MyHostAddr; /* The local machine address */ ! struct in_addr local_ip_address; /* Sometimes the same, sometimes not */ ! char *LocalHostName = NULL; /* Virtual host name */ ! struct in_addr LocalHostAddr; ! extern char *last_away_nick; ! char *invite_channel = (char *) 0, /* last channel of an INVITE */ ! *ircrc_file = (char *) 0, /* full path .ircrc file */ ! *my_path = (char *) 0, /* path to users home dir */ ! *irc_path = (char *) 0, /* paths used by /load */ ! *irc_lib = (char *) 0, /* path to the ircII library */ #ifdef ALLOW_LONG_NICKNAMES ! nickname[LONG_NICKNAME_LEN + 1], #else ! nickname[NICKNAME_LEN + 1], /* users nickname */ #endif ! hostname[NAME_LEN + 1], /* name of current host */ ! realname[REALNAME_LEN + 1], /* real name of user */ ! username[NAME_LEN + 1], /* usernameof user */ ! *send_umode = NULL, /* sent umode */ ! *last_notify_nick = (char *) 0, /* last detected nickname */ ! empty_string[] = "", /* just an empty string */ ! space[] = " ", /* just a lonely space */ ! *who_name = (char *) 0, /* extra /who switch info */ ! *who_file = (char *) 0, /* extra /who switch info */ ! *who_server = (char *) 0, /* extra /who switch info */ ! *who_host = (char *) 0, /* extra /who switch info */ ! *who_nick = (char *) 0, /* extra /who switch info */ ! *who_real = (char *) 0, /* extra /who switch info */ ! *cannot_open = (char *) 0, /* extra /who switch info */ ! *cut_buffer = (char *) 0; /* global cut_buffer */ ! int away_set = 0, /* set if there is an away * message anywhere */ ! quick_startup = 0; /* set if we ignore .ircrc */ ! time_t idle_time = 0, /* amount of time we've been idle */ ! start_time; /* the time when we booted up */ ! fd_set readables, writables; ! int child_dead = 0; /* global function delcarations */ *************** *** 244,249 **** --- 247,254 ---- destroy_call_stack(); #endif window_display = old_window_display; + fprintf(stdout, "\r"); + fflush(stdout); if (really_quit) exit(0); *************** *** 464,474 **** int argc; #endif { - int ac; int add_servers = 0; struct passwd *entry; ! char my_buffer[1024]; char *channel = (char *) 0; char *ptr = (char *) 0; --- 469,478 ---- int argc; #endif { int ac; int add_servers = 0; struct passwd *entry; ! struct hostent *hp; char *channel = (char *) 0; char *ptr = (char *) 0; *************** *** 810,826 **** #endif strmcpy(username, "Unknown", NAME_LEN); ! gethostname(my_buffer, sizeof(my_buffer)); ! e_hostname(NULL, my_buffer, empty_string); if (!*nickname) ! strmcpy(nickname, username, ! #ifdef ALLOW_LONG_NICKNAMES ! LONG_NICKNAME_LEN ! #else ! NICKNAME_LEN ! #endif ! ); if (!check_nickname(nickname)) { --- 814,843 ---- #endif strmcpy(username, "Unknown", NAME_LEN); ! ! if (getenv("IRCHOST")) ! LocalHostName = m_strdup(getenv("IRCHOST")); ! ! if (gethostname(hostname, NAME_LEN)) ! { ! if (!LocalHostName) ! { ! printf("Couldnt figure out your host name. Bailing out.\n"); ! exit(1); ! } ! } ! ! if (LocalHostName) ! { ! printf("Your hostname appears to be [%s]\n", LocalHostName); ! bzero((void *)&LocalHostAddr, sizeof(LocalHostAddr)); ! if ((hp = gethostbyname(LocalHostName))) ! bcopy(hp->h_addr, (void *)&LocalHostAddr, sizeof(LocalHostAddr)); ! } ! if (!*nickname) ! strmcpy(nickname, username, sizeof(nickname)); if (!check_nickname(nickname)) { *************** *** 901,907 **** update_input(UPDATE_ALL); ! /* We cant delete stuff here becuase the get_line function * still needs to look at stuff->done. So we let it delete * the items off the list. But we removed it from the list, * so we wont accidentally use it later. --- 918,925 ---- update_input(UPDATE_ALL); ! /* ! * We cant delete stuff here becuase the get_line function * still needs to look at stuff->done. So we let it delete * the items off the list. But we removed it from the list, * so we wont accidentally use it later. *************** *** 909,915 **** return; } ! /* This is a wrapper for io(). Only two functions at any time are allowed * to call it, and main() is one of those two. When you call it, you have * the option to change the input prompt and the input buffer. You also * give it a function to call when it gets a return. Only main() is --- 927,934 ---- return; } ! /* ! * This is a wrapper for io(). Only two functions at any time are allowed * to call it, and main() is one of those two. When you call it, you have * the option to change the input prompt and the input buffer. You also * give it a function to call when it gets a return. Only main() is *************** *** 921,927 **** { GetLine *ptr, *stuff; ! /* if we're in dumb mode, we dont do anything, we just let * io() have all the fun. Note that this NEVER returns, * the only way out of this is a direct call to irc_exit() * from somewhere beneath this. --- 940,947 ---- { GetLine *ptr, *stuff; ! /* ! * if we're in dumb mode, we dont do anything, we just let * io() have all the fun. Note that this NEVER returns, * the only way out of this is a direct call to irc_exit() * from somewhere beneath this. *************** *** 963,969 **** set_input_prompt(prompt); set_input(empty_string); ! /* ok. we call io() until the user presses return, ending * the input line. get_line_return will then set get_line_done * to one, and we will stop getting characters and drop out. * get_line_done NEVER sets this to one if we are in our call --- 983,990 ---- set_input_prompt(prompt); set_input(empty_string); ! /* ! * ok. we call io() until the user presses return, ending * the input line. get_line_return will then set get_line_done * to one, and we will stop getting characters and drop out. * get_line_done NEVER sets this to one if we are in our call *************** *** 975,981 **** if (new_input == -1) panic("get_line: input == -1 is illegal value"); ! /* By the time we get here, stuff->done has been set to 1, * which means that get_line_return has already freed the * interesting items in stuff and removed it from the list. * Noone but us has a pointer to it, so we free it here. --- 996,1003 ---- if (new_input == -1) panic("get_line: input == -1 is illegal value"); ! /* ! * By the time we get here, stuff->done has been set to 1, * which means that get_line_return has already freed the * interesting items in stuff and removed it from the list. * Noone but us has a pointer to it, so we free it here. *************** *** 1355,1404 **** check_invalid_host(); channel = parse_args(argv, argc); ! printf("EPIC Version 3 -- EPIC Software Labs (1996)\n"); printf("%s\n", compile_info); FD_ZERO(&readables); FD_ZERO(&writables); ! #if defined(_HPUX_SOURCE) || defined(ESIX) ! /* Curses code added for HP-UX use */ if (!dumb) { initscr(); noecho(); cbreak(); - } #endif /* _HPUX_SOURCE || ESIX */ - - /* If we're a bot, do the bot thing. */ - if (!use_input && !no_fork && fork()) - _exit(0); - - #ifdef ESIX - if (gethostname(hostname, NAME_LEN) == NULL) - #else - if (gethostname(hostname, NAME_LEN)) - #endif /* ESIX */ - { - fprintf(stderr, "irc: couldn't figure out the name of your machine!\n"); - exit(1); - } - - if (dumb) - { - new_window(); - (void) MY_SIGNAL(SIGHUP, (background ? SIG_IGN : irc_exit_old), 0); - } - else - { - init_screen(); #if !defined(MUNIX) && !defined(_RT) && !defined(ESIX) (void) MY_SIGNAL(SIGCONT, term_cont, 0); #endif /* !defined(MUNIX) && !defined(_RT) && !defined(ESIX) */ ! #if !defined(_RT) && defined(SIGWINCH) (void) MY_SIGNAL(SIGWINCH, sig_refresh_screen, 0); ! #endif /* _RT */ } /* these should be taken by both dumb and smart displays */ --- 1377,1412 ---- check_invalid_host(); channel = parse_args(argv, argc); ! printf("EPIC Version 3 -- EPIC Software Labs (1997)\n"); printf("%s\n", compile_info); FD_ZERO(&readables); FD_ZERO(&writables); ! /* If we're a bot, do the bot thing. */ ! if (!use_input && !no_fork && fork()) ! _exit(0); ! if (!dumb) { + #if defined(_HPUX_SOURCE) || defined(ESIX) + /* Curses code added for HP-UX use */ initscr(); noecho(); cbreak(); #endif /* _HPUX_SOURCE || ESIX */ #if !defined(MUNIX) && !defined(_RT) && !defined(ESIX) (void) MY_SIGNAL(SIGCONT, term_cont, 0); #endif /* !defined(MUNIX) && !defined(_RT) && !defined(ESIX) */ ! #if defined(SIGWINCH) (void) MY_SIGNAL(SIGWINCH, sig_refresh_screen, 0); ! #endif ! init_screen(); ! } ! else ! { ! new_window(); ! (void) MY_SIGNAL(SIGHUP, (background ? SIG_IGN : irc_exit_old), 0); } /* these should be taken by both dumb and smart displays */ diff -rcN ircii-EPIC3.002/source/ircaux.c ircii-EPIC3.003/source/ircaux.c *** ircii-EPIC3.002/source/ircaux.c Thu Oct 3 16:49:32 1996 --- ircii-EPIC3.003/source/ircaux.c Thu Jan 2 18:52:16 1997 *************** *** 48,57 **** * Malloc allocator with size caching. */ #ifdef __STDC__ ! char *new_malloc (int size) #else char *new_malloc(size) ! int size; #endif { char *ptr; --- 48,57 ---- * Malloc allocator with size caching. */ #ifdef __STDC__ ! char *new_malloc (size_t size) #else char *new_malloc(size) ! size_t size; #endif { char *ptr; *************** *** 99,109 **** } #ifdef __STDC__ ! char *new_realloc (char *ptr, int size) #else char *new_realloc(ptr, size) char *ptr; ! int size; #endif { char *ptr2 = NULL; --- 99,109 ---- } #ifdef __STDC__ ! char *new_realloc (char *ptr, size_t size) #else char *new_realloc(ptr, size) char *ptr; ! size_t size; #endif { char *ptr2 = NULL; diff -rcN ircii-EPIC3.002/source/ircserv.c ircii-EPIC3.003/source/ircserv.c *** ircii-EPIC3.002/source/ircserv.c Sun May 5 21:45:53 1996 --- ircii-EPIC3.003/source/ircserv.c Thu Jan 2 20:42:24 1997 *************** *** 141,147 **** /* if we couldnt connect, punt */ if (des < 0) { ! char *message = "!!!IRCSERV!! Couldnt connect\n"; write(CLIENT_FD, message, strlen(message)); exit(des); } --- 141,147 ---- /* if we couldnt connect, punt */ if (des < 0) { ! const char *message = "!!!IRCSERV!! Couldnt connect\n"; write(CLIENT_FD, message, strlen(message)); exit(des); } *************** *** 531,540 **** #ifdef __STDC__ ! char *new_malloc (int size) #else char *new_malloc(size) ! int size; #endif { char *ptr; --- 531,540 ---- #ifdef __STDC__ ! char *new_malloc (size_t size) #else char *new_malloc(size) ! size_t size; #endif { char *ptr; diff -rcN ircii-EPIC3.002/source/keys.c ircii-EPIC3.003/source/keys.c *** ircii-EPIC3.002/source/keys.c Fri Oct 11 23:20:28 1996 --- ircii-EPIC3.003/source/keys.c Fri Jan 3 01:29:33 1997 *************** *** 323,337 **** { switch (lookup_function(arg, &i)) { ! case 0: ! say("No such function %s", arg); ! return; ! case 1: ! key_names[i].func(0, NULL); ! break; ! default: ! say("Ambigious function %s", arg); ! break; } } } --- 323,337 ---- { switch (lookup_function(arg, &i)) { ! case 0: ! say("No such function %s", arg); ! return; ! case 1: ! key_names[i].func(0, args); ! break; ! default: ! say("Ambigious function %s", arg); ! break; } } } diff -rcN ircii-EPIC3.002/source/names.c ircii-EPIC3.003/source/names.c *** ircii-EPIC3.002/source/names.c Thu Sep 19 22:34:18 1996 --- ircii-EPIC3.003/source/names.c Mon Dec 9 07:32:43 1996 *************** *** 118,123 **** --- 118,124 ---- new->s_mode = (char *) 0; new->limit = 0; new->chop = 0; + new->voice = 0; new->server = server; new->window = curr_scr_win; new->key = NULL; *************** *** 132,137 **** --- 133,139 ---- new->s_mode = (char *) 0; new->limit = 0; new->chop = 0; + new->voice = 0; new->server = server; new->window = curr_scr_win; new->key = NULL; *************** *** 196,225 **** if ((chan = lookup_channel(channel, server, 0)) != NULL) { ! if (*nick == '@') { nick++; ! if (my_stricmp(nick, get_server_nickname(server)) == 0) { check_mode_list_join(channel); ! chan->chop = 1; } - ischop = 1; } ! else if (*nick == '+') { nick++; ! ! if (*nick == '@') { ! nick++; ! if (my_stricmp(nick, get_server_nickname(server)) == 0) ! { ! check_mode_list_join(channel); ! chan->chop = 1; ! } ! ischop = 1; } } if ((new = (NickList *) remove_from_list((List **)&(chan->nicks), nick)) --- 198,221 ---- if ((chan = lookup_channel(channel, server, 0)) != NULL) { ! if (*nick == '+') { nick++; ! if (!my_stricmp(nick, get_server_nickname(server))) { check_mode_list_join(channel); ! chan->voice = 1; } } ! if (*nick == '@') { nick++; ! if (my_stricmp(nick, get_server_nickname(server)) == 0) { ! check_mode_list_join(channel); ! chan->chop = 1; } + ischop = 1; } if ((new = (NickList *) remove_from_list((List **)&(chan->nicks), nick)) *************** *** 292,303 **** * commands and convert that mode string into a one byte bit map of modes */ #ifdef __STDC__ ! static int decifer_mode (char *mode_str, u_long *mode, char *chop, NickList **nicks, char **key) #else ! static int decifer_mode(mode_str, mode, chop, nicks, key) char *mode_str; u_long *mode; char *chop; NickList **nicks; char **key; #endif --- 288,300 ---- * commands and convert that mode string into a one byte bit map of modes */ #ifdef __STDC__ ! static int decifer_mode (char *mode_str, u_long *mode, char *chop, char *voice, NickList **nicks, char **key) #else ! static int decifer_mode(mode_str, mode, chop, voice, nicks, key) char *mode_str; u_long *mode; char *chop; + char *voice; NickList **nicks; char **key; #endif *************** *** 375,380 **** --- 372,381 ---- new_free(key); break; case 'v': + if ((person = next_arg(rest, &rest)) && + !my_stricmp(person, get_server_nickname(from_server))) + *voice = add; + break; case 'b': (void) next_arg(rest, &rest); break; *************** *** 429,435 **** { tmp->mode = 0; if ((limit = decifer_mode(mode, &(tmp->mode), &(tmp->chop), ! &(tmp->nicks), &(tmp->key))) != -1) tmp->limit = limit; } } --- 430,436 ---- { tmp->mode = 0; if ((limit = decifer_mode(mode, &(tmp->mode), &(tmp->chop), ! &(tmp->voice), &(tmp->nicks), &(tmp->key))) != -1) tmp->limit = limit; } } *************** *** 452,458 **** if ((tmp = lookup_channel(channel, from_server, 0)) != NULL) { if ((limit = decifer_mode(mode, &(tmp->mode), &(tmp->chop), ! &(tmp->nicks), &(tmp->key))) != -1) tmp->limit = limit; } } --- 453,459 ---- if ((tmp = lookup_channel(channel, from_server, 0)) != NULL) { if ((limit = decifer_mode(mode, &(tmp->mode), &(tmp->chop), ! &(tmp->voice), &(tmp->nicks), &(tmp->key))) != -1) tmp->limit = limit; } } *************** *** 936,945 **** } #ifdef __STDC__ ! extern int get_channel_oper (char *channel, int server) #else ! extern int get_channel_oper(channel, server) ! char *channel; int server; #endif { --- 937,946 ---- } #ifdef __STDC__ ! extern int get_channel_oper (char *channel, int server) #else ! extern int get_channel_oper(channel, server) ! char * channel; int server; #endif { *************** *** 948,954 **** if ((chan = lookup_channel(channel, server, 0)) != NULL) return chan->chop; else ! return 1; } #ifdef __STDC__ --- 949,971 ---- if ((chan = lookup_channel(channel, server, 0)) != NULL) return chan->chop; else ! return 1; /* _one_ ??? */ ! } ! ! #ifdef __STDC__ ! extern int get_channel_voice (char *channel, int server) ! #else ! extern int get_channel_voice (channel, server) ! char * channel; ! int server; ! #endif ! { ! ChannelList *chan; ! ! if ((chan = lookup_channel(channel, server, 0))) ! return chan->voice; ! else ! return 1; /* see above */ } #ifdef __STDC__ *************** *** 1097,1099 **** --- 1114,1117 ---- prev = curr; } } + diff -rcN ircii-EPIC3.002/source/network.c ircii-EPIC3.003/source/network.c *** ircii-EPIC3.002/source/network.c Mon Sep 16 14:16:49 1996 --- ircii-EPIC3.003/source/network.c Tue Dec 10 19:16:31 1996 *************** *** 133,152 **** /* Inet domain client */ else if (!is_unix && (service == SERVICE_CLIENT)) { ! struct sockaddr_in name; struct hostent *hp; ! bzero (&name, sizeof(struct sockaddr_in)); ! hp = resolv(hostn); ! if (hp == NULL) return close(fd), -6; ! ! bcopy(hp->h_addr, &(name.sin_addr), hp->h_length); ! name.sin_family = AF_INET; ! name.sin_port = htons(*portnum); alarm(CONNECT_TIMEOUT); ! if (connect (fd, (struct sockaddr *)&name, sizeof(name)) < 0) { alarm(0); return close(fd), -4; --- 133,167 ---- /* Inet domain client */ else if (!is_unix && (service == SERVICE_CLIENT)) { ! struct sockaddr_in server; ! struct sockaddr_in localaddr; struct hostent *hp; ! /* ! * Doing this bind is bad news unless you are sure that ! * the hostname is valid. This is not true for me at home, ! * since i dynamic-ip it. ! */ ! if (LocalHostName) ! { ! bzero(&localaddr, sizeof(struct sockaddr_in)); ! localaddr.sin_family = AF_INET; ! localaddr.sin_addr = LocalHostAddr; ! localaddr.sin_port = 0; ! if (bind(fd, (struct sockaddr *)&localaddr, sizeof(localaddr))) ! return close(fd), -2; ! } ! ! bzero(&server, sizeof(struct sockaddr_in)); ! if (!(hp = resolv(hostn))) return close(fd), -6; ! ! bcopy(hp->h_addr, &(server.sin_addr), hp->h_length); ! server.sin_family = AF_INET; ! server.sin_port = htons(*portnum); alarm(CONNECT_TIMEOUT); ! if (connect (fd, (struct sockaddr *)&server, sizeof(server)) < 0) { alarm(0); return close(fd), -4; *************** *** 256,265 **** const char *what; #endif { ! int b1 = 0, b2 = 0, b3 = 0, b4 = 0; ! sscanf(what, "%d.%d.%d.%d", &b1, &b2, &b3, &b4); ! ! if ((b1 == 0) && (b2 == 0) && (b3 == 0) && (b4 == 0)) return host_to_ip (what); else return ip_to_host (what); --- 271,278 ---- const char *what; #endif { ! /* if the last char is a digit, it's an ip, else a hostname. */ ! if (!isdigit(what[strlen(what)-1])) return host_to_ip (what); else return ip_to_host (what); diff -rcN ircii-EPIC3.002/source/newio.c ircii-EPIC3.003/source/newio.c *** ircii-EPIC3.002/source/newio.c Thu Jul 4 17:27:52 1996 --- ircii-EPIC3.003/source/newio.c Thu Jan 2 17:22:32 1997 *************** *** 19,24 **** --- 19,25 ---- #include "irc.h" #include "ircaux.h" + #include #ifdef ISC22 # include *************** *** 204,209 **** --- 205,216 ---- dgets_errno = 0; return (-1); default: + { + #if 0 + int nbytes; + ioctl(des, FIONREAD, &nbytes); + if (x_debug) yell("FD [%d], reading [%d] bytes", des, nbytes); + #endif #ifdef ESIX if (io_rec[des]->flags & IO_SOCKET) c = recv(des, io_rec[des]->buffer + *************** *** 226,231 **** --- 233,239 ---- } io_rec[des]->write_pos += c; break; + } } } while (io_rec[des]->read_pos < io_rec[des]->write_pos) diff -rcN ircii-EPIC3.002/source/numbers.c ircii-EPIC3.003/source/numbers.c *** ircii-EPIC3.002/source/numbers.c Sun Oct 13 20:09:24 1996 --- ircii-EPIC3.003/source/numbers.c Mon Jan 6 16:57:08 1997 *************** *** 783,789 **** } case 329: /* #define CREATION_TIME 329 */ { ! unsigned long tme; char *this_sucks; sscanf(ArgList[1], "%lu", &tme); --- 783,789 ---- } case 329: /* #define CREATION_TIME 329 */ { ! time_t tme; char *this_sucks; sscanf(ArgList[1], "%lu", &tme); diff -rcN ircii-EPIC3.002/source/output.c ircii-EPIC3.003/source/output.c *** ircii-EPIC3.002/source/output.c Tue Jul 30 00:17:29 1996 --- ircii-EPIC3.003/source/output.c Thu Jan 2 18:55:39 1997 *************** *** 158,167 **** /* put_file: uses put_it() to display the contents of a file to the display */ #ifdef __STDC__ ! void put_file (char *filename) #else ! void put_file(filename) ! char *filename; #endif { FILE *fp; --- 158,167 ---- /* put_file: uses put_it() to display the contents of a file to the display */ #ifdef __STDC__ ! void put_file (const char *filename) #else ! void put_file(filename) ! const char *filename; #endif { FILE *fp; *************** *** 193,204 **** * It just doesn't work. - phone, jan 1993. */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void put_it(char *format, ...) #else void put_it(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (window_display && format) --- 193,204 ---- * It just doesn't work. - phone, jan 1993. */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void put_it(const char *format, ...) #else void put_it(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! const char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (window_display && format) *************** *** 220,231 **** * before actually putting things out. */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void say (char *format, ...) #else void say(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (window_display && format) --- 220,231 ---- * before actually putting things out. */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void say (const char *format, ...) #else void say(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! const char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (window_display && format) *************** *** 246,257 **** } #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void yell(char *format, ...) #else void yell(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (format) --- 246,257 ---- } #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void yell(const char *format, ...) #else void yell(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! const char *format; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (format) *************** *** 272,284 **** /* help_put_it: works just like put_it, but is specially used by help */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void help_put_it (char *topic, char *format, ...) #else void help_put_it (topic, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! char *format, ! *topic; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (format) --- 272,284 ---- /* help_put_it: works just like put_it, but is specially used by help */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void help_put_it (const char *topic, const char *format, ...) #else void help_put_it (topic, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! const char *format, ! *topic; ! char *arg1, *arg2, *arg3, *arg4, *arg5, ! *arg6, *arg7, *arg8, *arg9, *arg10; #endif { if (format) diff -rcN ircii-EPIC3.002/source/screen.c ircii-EPIC3.003/source/screen.c *** ircii-EPIC3.002/source/screen.c Wed Oct 9 23:32:32 1996 --- ircii-EPIC3.003/source/screen.c Fri Jan 10 10:46:43 1997 *************** *** 709,714 **** --- 709,731 ---- new_free(&window->display_ip->line); } + /* + * XXXX - this probably doesnt belong here, but so what. + * archon wanted a way to have hidden windows beep, even + * though theyre hidden. This is a relatively minor hack, + * hopefully it wont offend too many people. >;-) + */ + if (!window->visible && window->beep_always && index(str, '\007')) + { + Window *old_to_window; + + term_beep(); + old_to_window = to_window; + to_window = curr_scr_win; + say("Beep in window %d", window->refnum); + to_window = old_to_window; + } + if (window->visible) { /* make sure the cursor is in the appropriate window */ *************** *** 975,983 **** --- 992,1002 ---- if (dumb) return; + base_size = ((LI - 1) / current_screen->visible_windows) - 1; extra = (LI - 1) - ((base_size + 1) * current_screen->visible_windows); top = 0; + for (tmp = current_screen->window_list; tmp; tmp = tmp->next) { tmp->update |= REDRAW_DISPLAY_FULL | REDRAW_STATUS; *************** *** 988,1002 **** } else size = base_size; #ifdef SCROLL_AFTER_DISPLAY ! tmp->display_size = size - tmp->menu.lines - 1; ! #else ! tmp->display_size = size - tmp->menu.lines; ! #endif /* SCROLL_AFTER_DISPLAY */ ! if (tmp->display_size<=0) tmp->display_size = 1; tmp->top = top; ! tmp->bottom = top + size; top += size + 1; } } --- 1007,1023 ---- } else size = base_size; + + tmp->display_size = size - tmp->menu.lines - tmp->double_status #ifdef SCROLL_AFTER_DISPLAY ! -1 ! #endif ! ; ! ! if (tmp->display_size <= 0) tmp->display_size = 1; tmp->top = top; ! tmp->bottom = top + size - tmp->double_status; top += size + 1; } } *************** *** 1138,1144 **** tmp->update |= REDRAW_DISPLAY_FULL | REDRAW_STATUS; tmp->top = top; tmp->bottom = top + tmp->display_size + tmp->menu.lines; ! top += tmp->display_size + tmp->menu.lines + 1; } } --- 1159,1166 ---- tmp->update |= REDRAW_DISPLAY_FULL | REDRAW_STATUS; tmp->top = top; tmp->bottom = top + tmp->display_size + tmp->menu.lines; ! top += tmp->display_size + tmp->menu.lines + 1 + ! tmp->double_status; } } *************** *** 1677,1683 **** new->current_channel = 0; new->query_nick = 0; new->hold_on_next_rite = 0; ! new->status_line = 0; new->top_of_display = 0; new->display_ip = 0; new->display_size = 1; --- 1699,1707 ---- new->current_channel = 0; new->query_nick = 0; new->hold_on_next_rite = 0; ! new->status_line[0] = NULL; ! new->status_line[1] = NULL; ! new->double_status = 0; new->top_of_display = 0; new->display_ip = 0; new->display_size = 1; diff -rcN ircii-EPIC3.002/source/server.c ircii-EPIC3.003/source/server.c *** ircii-EPIC3.002/source/server.c Mon Oct 28 06:53:09 1996 --- ircii-EPIC3.003/source/server.c Fri Jan 17 21:09:17 1997 *************** *** 36,41 **** --- 36,42 ---- static void add_to_server_buffer _((int, char *)); static char * do_umode (int du_index); + const char * umodes = "abcdefghijklmnopqrstuvwxyz"; /* * Don't want to start ircserv by default... *************** *** 561,567 **** */ if (number_of_servers == 1) { ! yell("Sorry. all servers are refusing your connection"); irc_exit(1, NULL); } --- 562,568 ---- */ if (number_of_servers == 1) { ! say("Sorry, the server list is empty and I just dont know what to do."); irc_exit(1, NULL); } *************** *** 1352,1378 **** { char *c = server_list[du_index].umode; int flags = server_list[du_index].flags; ! if (flags & USER_MODE_C) ! *c++ = 'c'; ! if (flags & USER_MODE_D) ! *c++ = 'd'; ! if (flags & USER_MODE_F) ! *c++ = 'f'; ! if (flags & USER_MODE_I) ! *c++ = 'i'; ! if (flags & USER_MODE_K) ! *c++ = 'k'; ! if (get_server_operator(du_index)) ! *c++ = 'o'; ! if (flags & USER_MODE_R) ! *c++ = 'r'; ! if (flags & USER_MODE_S) ! *c++ = 's'; ! if (flags & USER_MODE_U) ! *c++ = 'u'; ! if (flags & USER_MODE_W) ! *c++ = 'w'; *c = '\0'; return server_list[du_index].umode; --- 1353,1365 ---- { char *c = server_list[du_index].umode; int flags = server_list[du_index].flags; + int i; ! for (i = 0; umodes[i]; i++) ! { ! if (flags & USER_MODES << i) ! *c++ = umodes[i]; ! } *c = '\0'; return server_list[du_index].umode; *************** *** 1814,1823 **** /* send_to_server: sends the given info the the server */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void send_to_server (char *format, ...) #else void send_to_server (format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! char *format; char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9, *arg10; #endif --- 1801,1810 ---- /* send_to_server: sends the given info the the server */ #if defined(__STDC__) && defined(HAVE_STDARG_H) ! void send_to_server (const char *format, ...) #else void send_to_server (format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) ! const char *format; char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9, *arg10; #endif diff -rcN ircii-EPIC3.002/source/status.c ircii-EPIC3.003/source/status.c *** ircii-EPIC3.002/source/status.c Fri Oct 4 14:19:00 1996 --- ircii-EPIC3.003/source/status.c Sun Dec 15 21:00:38 1996 *************** *** 33,39 **** extern time_t time _((time_t *)); extern char *update_clock _((int)); ! static char *convert_format _((char *)); static char *status_nickname _((Window *)); static char *status_query_nick _((Window *)); static char *status_right_justify _((Window *)); --- 33,39 ---- extern time_t time _((time_t *)); extern char *update_clock _((int)); ! static char *convert_format _((char *, int)); static char *status_nickname _((Window *)); static char *status_query_nick _((Window *)); static char *status_right_justify _((Window *)); *************** *** 80,85 **** --- 80,86 ---- static char *status_refnum _((Window *)); static char *status_null_function _((Window *)); static char *status_notify_windows _((Window *)); + static char *status_voice _((Window *)); static void status_make_printable _((unsigned char *, int)); /* *************** *** 90,101 **** * This number will need to change to 50 when I impliment more status_user * variables. -- Jake [WinterHawk] Khuon */ ! #define MAX_FUNCTIONS 39 /* The format statements to build each portion of the status line */ static char *mode_format = (char *) 0; static char *umode_format = (char *) 0; ! static char *status_format = (char *) 0; static char *query_format = (char *) 0; static char *clock_format = (char *) 0; static char *hold_lines_format = (char *) 0; --- 91,102 ---- * This number will need to change to 50 when I impliment more status_user * variables. -- Jake [WinterHawk] Khuon */ ! #define MAX_FUNCTIONS 40 /* The format statements to build each portion of the status line */ static char *mode_format = (char *) 0; static char *umode_format = (char *) 0; ! static char *status_format[3] = {NULL, NULL, NULL}; static char *query_format = (char *) 0; static char *clock_format = (char *) 0; static char *hold_lines_format = (char *) 0; *************** *** 108,117 **** * status_func: The list of status line function in the proper order for * display. This list is set in convert_format() */ ! static char *(*status_func[MAX_FUNCTIONS]) (); /* func_cnt: the number of status line functions assigned */ ! static int func_cnt; static int alarm_hours, /* hour setting for alarm in 24 hour time */ alarm_minutes; /* minute setting for alarm */ --- 109,118 ---- * status_func: The list of status line function in the proper order for * display. This list is set in convert_format() */ ! static char *(*status_func[3][MAX_FUNCTIONS]) _((Window *)); /* func_cnt: the number of status line functions assigned */ ! static int func_cnt[3]; static int alarm_hours, /* hour setting for alarm in 24 hour time */ alarm_minutes; /* minute setting for alarm */ *************** *** 423,472 **** } #ifdef __STDC__ ! static char *convert_format (char *str) #else ! static char * convert_format(str) ! char *str; #endif { char buffer[BIG_BUFFER_SIZE + 1]; ! char *ptr, ! *format, ! *malloc_ptr = (char *) 0; ! format = get_string_var(STATUS_FORMAT_VAR); ! *buffer = (char) 0; while (format) { if ((ptr = (char *) index(format, '%')) != NULL) { ! *ptr = (char) 0; strmcat(buffer, format, BIG_BUFFER_SIZE); ! *(ptr++) = '%'; ! if (func_cnt < MAX_FUNCTIONS) { /* So i alphabatized them. Sue me. */ switch (*(ptr++)) { case 'A': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_away; break; case 'B': new_free(&hold_lines_format); hold_lines_format = convert_sub_format(get_string_var(STATUS_HOLD_LINES_VAR), 'B'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_hold_lines; break; case 'C': new_free(&channel_format); channel_format = convert_sub_format(get_string_var(STATUS_CHANNEL_VAR), 'C'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++]= status_channel; break; case 'D': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_dcc; break; case 'E': break; /* nothing to do */ --- 424,475 ---- } #ifdef __STDC__ ! static char *convert_format (char *format, int k) #else ! static char * convert_format(format, k) ! char *format; ! int k; #endif { char buffer[BIG_BUFFER_SIZE + 1]; ! char *ptr; ! int cp; ! *buffer = 0; while (format) { if ((ptr = (char *) index(format, '%')) != NULL) { ! *ptr = 0; strmcat(buffer, format, BIG_BUFFER_SIZE); ! *ptr = '%'; ! ptr++; ! ! cp = func_cnt[k]; ! if (cp < MAX_FUNCTIONS) { /* So i alphabatized them. Sue me. */ switch (*(ptr++)) { case 'A': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_away; break; case 'B': new_free(&hold_lines_format); hold_lines_format = convert_sub_format(get_string_var(STATUS_HOLD_LINES_VAR), 'B'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_hold_lines; break; case 'C': new_free(&channel_format); channel_format = convert_sub_format(get_string_var(STATUS_CHANNEL_VAR), 'C'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_channel; break; case 'D': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_dcc; break; case 'E': break; /* nothing to do */ *************** *** 474,490 **** new_free(¬ify_format); notify_format = convert_sub_format(get_string_var(STATUS_NOTIFY_VAR), 'F'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_notify_windows; break; case 'G': break; /* nothing to do */ case 'H': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_hold; break; case 'I': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_insert_mode; break; case 'J': break; /* nothing to do */ --- 477,493 ---- new_free(¬ify_format); notify_format = convert_sub_format(get_string_var(STATUS_NOTIFY_VAR), 'F'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_notify_windows; break; case 'G': break; /* nothing to do */ case 'H': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_hold; break; case 'I': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_insert_mode; break; case 'J': break; /* nothing to do */ *************** *** 496,510 **** new_free(&mail_format); mail_format = convert_sub_format(get_string_var(STATUS_MAIL_VAR), 'M'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_mail; break; case 'N': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_nickname; break; case 'O': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_overwrite_mode; break; case 'P': break; /* nothing to do */ --- 499,513 ---- new_free(&mail_format); mail_format = convert_sub_format(get_string_var(STATUS_MAIL_VAR), 'M'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_mail; break; case 'N': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_nickname; break; case 'O': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_overwrite_mode; break; case 'P': break; /* nothing to do */ *************** *** 512,629 **** new_free(&query_format); query_format = convert_sub_format(get_string_var(STATUS_QUERY_VAR), 'Q'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_query_nick; break; case 'R': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_refnum; break; case 'S': new_free(&server_format); server_format = convert_sub_format(get_string_var(STATUS_SERVER_VAR), 'S'); strmcat(buffer,"%s",BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_server; break; case 'T': new_free(&clock_format); clock_format = convert_sub_format(get_string_var(STATUS_CLOCK_VAR), 'T'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_clock; break; case 'U': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user0; break; case 'V': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_version; break; case 'W': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_window; break; case 'X': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user1; break; case 'Y': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user2; break; case 'Z': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user3; break; case '#': /* 35 */ new_free(&umode_format); umode_format = convert_sub_format(get_string_var(STATUS_UMODE_VAR), '#'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_umode; break; case '%': /* 37 */ strmcat(buffer, "%", BIG_BUFFER_SIZE); break; case '*': /* 42 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_oper; break; case '+': /* 43 */ new_free(&mode_format); mode_format = convert_sub_format(get_string_var(STATUS_MODE_VAR), '+'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_mode; break; case '>': /* 62 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_right_justify; break; case '@': /* 64 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_chanop; break; /* status_user[0..3] are redundant of U, X, Y, and Z -- Jake [WinterHawk] Khuon */ case '0': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user0; break; case '1': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user1; break; case '2': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user2; break; case '3': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user3; break; /* These babies are new additions. -- Jake [WinterHawk] Khuon */ case '4': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user4; break; case '5': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user5; break; case '6': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user6; break; case '7': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user7; break; case '8': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user8; break; case '9': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[func_cnt++] = status_user9; break; /* no default..?? - phone, jan 1993 */ --- 515,636 ---- new_free(&query_format); query_format = convert_sub_format(get_string_var(STATUS_QUERY_VAR), 'Q'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_query_nick; break; case 'R': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_refnum; break; case 'S': new_free(&server_format); server_format = convert_sub_format(get_string_var(STATUS_SERVER_VAR), 'S'); strmcat(buffer,"%s",BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_server; break; case 'T': new_free(&clock_format); clock_format = convert_sub_format(get_string_var(STATUS_CLOCK_VAR), 'T'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_clock; break; case 'U': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user0; break; case 'V': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_version; break; case 'W': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_window; break; case 'X': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user1; break; case 'Y': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user2; break; case 'Z': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user3; break; case '#': /* 35 */ new_free(&umode_format); umode_format = convert_sub_format(get_string_var(STATUS_UMODE_VAR), '#'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_umode; break; case '%': /* 37 */ strmcat(buffer, "%", BIG_BUFFER_SIZE); break; case '*': /* 42 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_oper; break; case '+': /* 43 */ new_free(&mode_format); mode_format = convert_sub_format(get_string_var(STATUS_MODE_VAR), '+'); strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_mode; ! break; ! case '=': /* 61 */ ! strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_voice; break; case '>': /* 62 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_right_justify; break; case '@': /* 64 */ strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_chanop; break; /* status_user[0..3] are redundant of U, X, Y, and Z -- Jake [WinterHawk] Khuon */ case '0': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user0; break; case '1': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user1; break; case '2': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user2; break; case '3': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user3; break; /* These babies are new additions. -- Jake [WinterHawk] Khuon */ case '4': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user4; break; case '5': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user5; break; case '6': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user6; break; case '7': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user7; break; case '8': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user8; break; case '9': strmcat(buffer, "%s", BIG_BUFFER_SIZE); ! status_func[k][cp++] = status_user9; break; /* no default..?? - phone, jan 1993 */ *************** *** 632,799 **** } else ptr++; } else strmcat(buffer, format, BIG_BUFFER_SIZE); format = ptr; } ! /* this frees the old str first */ ! malloc_strcpy(&malloc_ptr, buffer); ! return (malloc_ptr); } #ifdef __STDC__ void build_status (char *format) #else ! void build_status(format) char *format; #endif { ! int i; ! new_free(&status_format); ! func_cnt = 0; ! if ((format = get_string_var(STATUS_FORMAT_VAR)) != NULL) ! status_format = convert_format(format); /* convert_format ! * mallocs for ! * us */ ! for (i = func_cnt; i < MAX_FUNCTIONS; i++) ! status_func[i] = status_null_function; update_all_status(); } #ifdef __STDC__ void make_status (Window *window) #else ! void make_status(window) Window *window; #endif { ! int i, len, RJustifyPos = -1, RealPosition; ! char buffer[BIG_BUFFER_SIZE + 1]; char *func_value[MAX_FUNCTIONS]; ! if (!dumb && status_format) { ! for (i = 0; i < MAX_FUNCTIONS; i++) ! func_value[i] = (status_func[i]) (window); ! *buffer = get_int_var(REVERSE_STATUS_LINE_VAR) ? REV_TOG : ' '; ! sprintf(buffer+1, status_format, func_value[0], func_value[1], ! func_value[2], func_value[3], func_value[4], func_value[5], ! func_value[6], func_value[7], func_value[8], func_value[9], ! func_value[10], func_value[11], func_value[12], ! func_value[13], func_value[14], func_value[15], ! func_value[16], func_value[17], func_value[18], ! func_value[19], func_value[20], func_value[21], ! func_value[22], func_value[23], func_value[24], ! func_value[25], func_value[26], func_value[27], ! func_value[28], func_value[29], func_value[30], ! func_value[31], func_value[32], func_value[33], ! func_value[34], func_value[35], func_value[36], ! func_value[37], func_value[38]); ! /* Save to code for when I have less of a life -- Jake [WinterHawk] Khuon ! func_value[39], ! func_value[40], func_value[41], func_value[42], ! func_value[43], func_value[44], func_value[45], ! func_value[46], func_value[47], func_value[48], ! func_value[49], func_value[50]); ! */ ! ! ! /* Patched 26-Mar-93 by Aiken ! * make_window now right-justifies everything after a %> ! * it's also more efficient. ! */ ! RealPosition = 0; ! for (i = 0; buffer[i]; i++) ! /* formfeed is a marker for left/right border */ ! if (buffer[i] == '\f') ! RJustifyPos = i; ! else if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG) { ! if (RealPosition == CO) { ! buffer[i] = '\0'; ! break; } - RealPosition++; } ! /* note that i points to the nul, RealPosition is vis.chars */ ! if (RJustifyPos == -1) ! { ! RJustifyPos = i; ! } ! else ! { ! /* get rid of the marker */ ! strcpy(&buffer[RJustifyPos], &buffer[RJustifyPos+1]); ! i--; ! } ! if (get_int_var(FULL_STATUS_LINE_VAR)) ! { ! int diff; ! char c; ! if ((RJustifyPos == 0) || get_int_var(STATUS_NO_REPEAT_VAR)) ! c = ' '; ! else ! c = buffer[RJustifyPos - 1]; ! diff = CO - RealPosition; ! for ( ; i >= RJustifyPos; i--) ! buffer[i + diff] = buffer[i]; ! for (i++ ; diff > 0 ; diff--, i++) ! buffer[i] = c; ! } ! len = strlen(buffer); ! buffer[len] = ALL_OFF; ! buffer[len+1] = (char) 0; ! status_make_printable(buffer, len); /* * Thanks to Max Bell (mbell@cie.uoregon.edu) for info about TVI * terminals and the sg terminal capability */ ! RealPosition = 0; ! if (window->status_line && (SG == -1)) ! { ! for (i = 0; buffer[i] && window->status_line[i]; i++) { ! if (buffer[i] != window->status_line[i]) ! break; ! if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG) ! RealPosition++; } ! } ! else ! i = 0; ! if ((len = strlen(buffer + i)) || buffer[i] || !window->status_line || window->status_line[i]) ! { ! Screen *old_current_screen; ! old_current_screen = current_screen; ! set_current_screen(window->screen); ! term_move_cursor(RealPosition, window->bottom); ! output_line(buffer, NULL, i); ! cursor_in_display(); ! if (term_clear_to_eol()) ! term_space_erase(len); ! malloc_strcpy(&window->status_line, buffer); ! set_current_screen(old_current_screen); } } cursor_to_input(); --- 639,836 ---- } else ptr++; + func_cnt[k] = cp; } else strmcat(buffer, format, BIG_BUFFER_SIZE); format = ptr; } ! ! return m_strdup(buffer); } #ifdef __STDC__ void build_status (char *format) #else ! void build_status(format) char *format; #endif { ! int i,k; ! ! for (k = 0; k < 3; k++) ! { ! new_free((char **)&status_format[k]); ! func_cnt[k] = 0; ! if (k == 0) ! format = get_string_var(STATUS_FORMAT_VAR); ! else if (k == 1) ! format = get_string_var(STATUS_FORMAT1_VAR); ! else if (k == 2) ! format = get_string_var(STATUS_FORMAT2_VAR); ! ! if (format) ! status_format[k] = convert_format(format, k); ! ! for (i = func_cnt[k]; i < MAX_FUNCTIONS; i++) ! status_func[k][i] = status_null_function; ! } update_all_status(); } + #ifdef __STDC__ void make_status (Window *window) #else ! void make_status(window) Window *window; #endif { ! int i, len, + k, RJustifyPos = -1, RealPosition; ! u_char buffer[BIG_BUFFER_SIZE + 1]; char *func_value[MAX_FUNCTIONS]; ! for (k = 0; k < window->double_status + 1; k++) { ! int l; + if (k) + l = 2; + else if (window->double_status) + l = 1; + else + l = 0; ! if (!dumb && status_format[l]) ! { ! for (i = 0; i < MAX_FUNCTIONS; i++) ! func_value[i] = (status_func[l][i])(window); ! *buffer = get_int_var(REVERSE_STATUS_LINE_VAR) ? REV_TOG : ' '; ! ! sprintf(buffer + 1, status_format[l], ! func_value[0], func_value[1], ! func_value[2], func_value[3], func_value[4], func_value[5], ! func_value[6], func_value[7], func_value[8], func_value[9], ! func_value[10], func_value[11], func_value[12], ! func_value[13], func_value[14], func_value[15], ! func_value[16], func_value[17], func_value[18], ! func_value[19], func_value[20], func_value[21], ! func_value[22], func_value[23], func_value[24], ! func_value[25], func_value[26], func_value[27], ! func_value[28], func_value[29], func_value[30], ! func_value[31], func_value[32], func_value[33], ! func_value[34], func_value[35], func_value[36], ! func_value[37], func_value[38], func_value[39]); ! ! /* ! * Patched 26-Mar-93 by Aiken ! * make_window now right-justifies everything ! * after a %> -- it's also more efficient. ! */ ! RealPosition = 0; ! RJustifyPos = -1; ! ! for (i = 0; buffer[i]; i++) { ! /* formfeed is a marker for left/right border */ ! if (buffer[i] == '\f') ! RJustifyPos = i; ! else if (buffer[i] != REV_TOG && ! buffer[i] != UND_TOG && ! buffer[i] != ALL_OFF && ! buffer[i] != BOLD_TOG) { ! if (RealPosition == CO) ! { ! buffer[i] = '\0'; ! break; ! } ! RealPosition++; } } ! /* ! * note that i points to the nul, ! * RealPosition is vis.chars ! */ ! if (RJustifyPos == -1) ! RJustifyPos = i; ! else ! { ! /* get rid of the marker */ ! strcpy(buffer+RJustifyPos, buffer+RJustifyPos+1); ! i--; ! } ! if (get_int_var(FULL_STATUS_LINE_VAR)) ! { ! int diff; ! char c; ! if ((RJustifyPos == 0) || get_int_var(STATUS_NO_REPEAT_VAR)) ! c = ' '; ! else ! c = buffer[RJustifyPos - 1]; ! diff = CO - RealPosition; ! for ( ; i >= RJustifyPos; i--) ! buffer[i + diff] = buffer[i]; ! for (i++ ; diff > 0 ; diff--, i++) ! buffer[i] = c; ! } ! len = strlen(buffer); ! buffer[len] = ALL_OFF; ! buffer[len+1] = (char) 0; ! status_make_printable(buffer, len); /* * Thanks to Max Bell (mbell@cie.uoregon.edu) for info about TVI * terminals and the sg terminal capability */ ! RealPosition = 0; ! if (window->status_line[k] && (SG == -1)) { ! for (i = 0; buffer[i] && window->status_line[k][i]; i++) ! { ! if (buffer[i] != (u_char)window->status_line[k][i]) ! break; ! if (buffer[i] != REV_TOG && ! buffer[i] != UND_TOG && ! buffer[i] != ALL_OFF && ! buffer[i] != BOLD_TOG) ! RealPosition++; ! } } ! else ! i = 0; ! if ((len = strlen(buffer + i)) || ! buffer[i] || !window->status_line[k] || ! window->status_line[k][i]) ! { ! Screen *old_current_screen; ! old_current_screen = current_screen; ! set_current_screen(window->screen); ! term_move_cursor(RealPosition, window->bottom + k); ! output_line(buffer, NULL, i); ! cursor_in_display(); ! if (term_clear_to_eol()) ! term_space_erase(len); ! malloc_strcpy(&window->status_line[k], buffer); ! set_current_screen(old_current_screen); ! } } } cursor_to_input(); *************** *** 1055,1060 **** --- 1092,1115 ---- sprintf(my_buffer, channel_format, channel); return my_buffer; } + + return empty_string; + } + + #ifdef __STDC__ + static char *status_voice (Window *window) + #else + static char *status_voice (window) + Window *window; + #endif + { + char *text; + + if (window->current_channel && + get_channel_voice(window->current_channel, window->server) && + !get_channel_oper(window->current_channel, window->server) && + (text = get_string_var(STATUS_VOICE_VAR))) + return text; return empty_string; } diff -rcN ircii-EPIC3.002/source/vars.c ircii-EPIC3.003/source/vars.c *** ircii-EPIC3.002/source/vars.c Wed Oct 9 07:30:26 1996 --- ircii-EPIC3.003/source/vars.c Mon Dec 9 23:09:54 1996 *************** *** 165,170 **** --- 165,172 ---- { "STATUS_CHANOP", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_CLOCK", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_FORMAT", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, + { "STATUS_FORMAT1", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, + { "STATUS_FORMAT2", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_HOLD", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_HOLD_LINES", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_INSERT", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, *************** *** 188,193 **** --- 190,196 ---- { "STATUS_USER7", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_USER8", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_USER9", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, + { "STATUS_VOICE", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "STATUS_WINDOW", STR_TYPE_VAR, 0, NULL, build_status, 0, 0 }, { "SUPPRESS_SERVER_MOTD", BOOL_TYPE_VAR, DEFAULT_SUPPRESS_SERVER_MOTD, NULL, NULL, 0, 0 }, { "SUPPRESS_FROM_REMOTE_SERVER",BOOL_TYPE_VAR, DEFAULT_SUPPRESS_FROM_REMOTE_SERVER, NULL, NULL, 0, 0}, *************** *** 222,227 **** --- 225,232 ---- set_string_var(NOTIFY_LEVEL_VAR, DEFAULT_NOTIFY_LEVEL); set_string_var(REALNAME_VAR, realname); set_string_var(STATUS_FORMAT_VAR, DEFAULT_STATUS_FORMAT); + set_string_var(STATUS_FORMAT1_VAR, DEFAULT_STATUS_FORMAT1); + set_string_var(STATUS_FORMAT2_VAR, DEFAULT_STATUS_FORMAT2); set_string_var(STATUS_AWAY_VAR, DEFAULT_STATUS_AWAY); set_string_var(STATUS_CHANNEL_VAR, DEFAULT_STATUS_CHANNEL); set_string_var(STATUS_CHANOP_VAR, DEFAULT_STATUS_CHANOP); *************** *** 247,252 **** --- 252,258 ---- set_string_var(STATUS_USER7_VAR, DEFAULT_STATUS_USER7); set_string_var(STATUS_USER8_VAR, DEFAULT_STATUS_USER8); set_string_var(STATUS_USER9_VAR, DEFAULT_STATUS_USER9); + set_string_var(STATUS_VOICE_VAR, DEFAULT_STATUS_VOICE); set_string_var(STATUS_WINDOW_VAR, DEFAULT_STATUS_WINDOW); set_string_var(USERINFO_VAR, DEFAULT_USERINFO); set_string_var(XTERM_OPTIONS_VAR, DEFAULT_XTERM_OPTIONS); diff -rcN ircii-EPIC3.002/source/window.c ircii-EPIC3.003/source/window.c *** ircii-EPIC3.002/source/window.c Mon Oct 14 07:26:45 1996 --- ircii-EPIC3.003/source/window.c Thu Dec 12 17:00:42 1996 *************** *** 508,515 **** tmp = *v_window; *v_window = *window; v_window->top = tmp.top; ! v_window->bottom = tmp.bottom; ! v_window->display_size = tmp.display_size + tmp.menu.lines - #ifdef SCROLL_AFTER_DISPLAY v_window->menu.lines - 1; #else --- 508,515 ---- tmp = *v_window; *v_window = *window; v_window->top = tmp.top; ! v_window->bottom = tmp.bottom + tmp.double_status - v_window->double_status; ! v_window->display_size = tmp.display_size + tmp.menu.lines + tmp.double_status - v_window->double_status - #ifdef SCROLL_AFTER_DISPLAY v_window->menu.lines - 1; #else *************** *** 523,529 **** size = window->display_size; *window = tmp; window->top = top; ! window->bottom = bottom; #ifdef SCROLL_AFTER_DISPLAY window->display_size = size - 1; #else --- 523,529 ---- size = window->display_size; *window = tmp; window->top = top; ! window->bottom = bottom - tmp.double_status; #ifdef SCROLL_AFTER_DISPLAY window->display_size = size - 1; #else *************** *** 759,766 **** #ifdef __STDC__ Window *get_window_by_refnum (u_int refnum) #else ! Window * ! get_window_by_refnum(refnum) u_int refnum; #endif { --- 759,765 ---- #ifdef __STDC__ Window *get_window_by_refnum (u_int refnum) #else ! Window * get_window_by_refnum(refnum) u_int refnum; #endif { *************** *** 780,785 **** --- 779,815 ---- return ((Window *) 0); } + + /* + * get_window: this parses out any window (visible or not) and returns a + * pointer to it + */ + #ifdef __STDC__ + int get_visible_by_refnum (char *args) + #else + int get_visible_by_refnum (args) + char *args; + #endif + { + char *arg; + Window *tmp; + + if ((arg = next_arg(args, &args)) != NULL) + { + if (is_number(arg)) + { + if ((tmp = get_window_by_refnum(atoi(arg))) != NULL) + return tmp->visible; + } + if ((tmp = get_window_by_name(arg)) != NULL) + return tmp->visible; + + return -1; + } + return -1; + } + + /* * clear_window_by_refnum: just like clear_window(), but it uses a refnum. If * the refnum is invalid, the current window is cleared. *************** *** 1197,1204 **** new->next = biggest; biggest->prev = new; new->top = biggest->top; ! new->bottom = (biggest->top + biggest->bottom) / 2; ! biggest->top = new->bottom + 1; #ifdef SCROLL_AFTER_DISPLAY new->display_size = new->bottom - new->top - 1; biggest->display_size = biggest->bottom - biggest->top - --- 1227,1234 ---- new->next = biggest; biggest->prev = new; new->top = biggest->top; ! new->bottom = (biggest->top + biggest->bottom) / 2 - new->double_status; ! biggest->top = new->bottom + new->double_status + 1; #ifdef SCROLL_AFTER_DISPLAY new->display_size = new->bottom - new->top - 1; biggest->display_size = biggest->bottom - biggest->top - *************** *** 1364,1370 **** else sprintf(buffer, "%u", window->refnum); malloc_strcpy(&tmp, buffer); ! new_free(&window->status_line); new_free(&window->query_nick); new_free(&window->current_channel); new_free(&window->waiting_channel); --- 1394,1401 ---- else sprintf(buffer, "%u", window->refnum); malloc_strcpy(&tmp, buffer); ! new_free(&window->status_line[0]); ! new_free(&window->status_line[1]); new_free(&window->query_nick); new_free(&window->current_channel); new_free(&window->waiting_channel); *************** *** 1470,1476 **** if (window == (Window *) 0) window = curr_scr_win; if (refresh) ! new_free(&(window->status_line)); make_status(window); } --- 1501,1510 ---- if (window == (Window *) 0) window = curr_scr_win; if (refresh) ! { ! new_free(&(window->status_line[0])); ! new_free(&(window->status_line[1])); ! } make_status(window); } *************** *** 1487,1493 **** return; for (tmp = current_screen->window_list; tmp; tmp = tmp->next) { ! new_free(&(tmp->status_line)); make_status(tmp); } update_input(UPDATE_JUST_CURSOR); --- 1521,1528 ---- return; for (tmp = current_screen->window_list; tmp; tmp = tmp->next) { ! new_free(&(tmp->status_line[0])); ! new_free(&(tmp->status_line[1])); make_status(tmp); } update_input(UPDATE_JUST_CURSOR); *************** *** 2811,2816 **** --- 2846,2871 ---- new_free(&window->bind_channel); } } + else if (!my_strnicmp("DOUBLE", arg, len)) + { + int current = window->double_status; + + if (!get_boolean("DOUBLE", &args, &window->double_status)) + { + window->display_size += current - window->double_status; + recalculate_window_positions(); + redraw_all_windows(); + build_status(NULL); + } + else + break; + } + else if (!my_strnicmp("BEEP_ALWAYS", arg, len)) + { + if (get_boolean("BEEP_ALWAYS", &args, &window->beep_always)) + break; + } + else say("Unknown WINDOW command: %s", arg); } *************** *** 2822,2827 **** --- 2877,2883 ---- say("Window %u", window->refnum); say("\tServer: %s", (window->server == -1) ? get_server_name(window->server) : ""); + say("\tGeometry Info: [%d %d %d %d]", window->top, window->bottom, window->line_cnt, window->display_size); say("\tCurrent channel: %s", window->current_channel ? window->current_channel : ""); if (window->waiting_channel) say ("\tWaiting channel: %s", window->waiting_channel); *************** *** 2830,2835 **** --- 2886,2892 ---- say("\tQuery User: %s", (window->query_nick ? window->query_nick : "")); say("\tPrompt: %s", window->prompt ? window->prompt : ""); + say("\tSecond status line is %s", var_settings[window->double_status]); say("\tScrolling is %s", var_settings[window->scroll]); say("\tLogging is %s", var_settings[window->log]); if (window->logfile)