/*** Ncohafmuta 1.5.* changes ***/ Quick need-to-do?: * if user .hilite==2 multi-tells with a lot of colored names in it might cut off the recipients (because of the input socket limit imposed) * need to fix web port so you don't need to put a / after the port number in the URL to get it to work?? 02/13/24 1.5.6 * Fix resolver clipon warning * Makefile.in cleanup 09/01/23 1.5.5 * Fixed compile error with restrict() function. Renamed to myrestrict() * Increased i_buff[] size in t_who 02/15/19 1.5.4 09/17/05 * Changed cast of last argument of execlp() call in resolver_client.c. Newer GCCs throw a sentinel warning if not cast correctly. 09/01/04 * Moved more DNS resolution functionality into resolve_add function, some which was in the log_misc_connect function * Slightly modified connection-based log entry content. * Slightly modified SMTP-based log entry content. * Default MAILPROG to smtp server 04/11/04 1.5.3 * Added a temp. user struct called bytes_read. * Added a function and prototype called check_flood_limits() * Added flood protection for input and output. * Added FLOOD_INPUT_LIMIT and FLOOD_OUTPUT_LIMIT protection settings to hdrfiles/constants.h * Added a README.flood_protection file in docs/ * Added a check for no define fortune program * Fixed a missing dependency in Makefile.in which would cause main.c not to compile itself again if changed. * Fixed glitch in write_log buffering. 03/20/04 1.5.2 * Version 1.4.2 changes * Updated ascii code comments in socket_funcs.c * Changed miscnum2 user structure to localecho. Added "localecho" keyword to login prompt to turn on echoing. Added ".set localecho" command. Added info to ".set show". This will work with charmode AND linemode clients. Updated info in loginhelp file to talk about localecho. * Added write_char() func for localecho support. * Changed set_car_ret() and set_white_space() funcs to not take inpstr. * Updated helpfiles. Added set_localecho helpfile. * Added CR or LF respectively to clients that only send one or the other. 03/20/04 1.4.2 * Fixed glitch in t_who with buffering. * Try to dynamically make proper width for room column in .who headers now. 03/15/04 1.5.1 * Version 1.4.1 changes * Some storybot action/command development 03/15/04 1.4.1 * Fixed glitch with resetting autoforward limits at midnight, where if a user was online when the reset was done, their limit wouldn't get reset back to 0 * Updated SMTP delivery from and to envelopes to use <> enclosers as per RFC * Added header file depends to Makefile.in, so make knows to recompile objects when a .h file changes (don't need to do a "make objclean" now, if you just change a .h file). Also cleaned up file a bit. * Updated docs/smtp_handling.txt explaining SMTP error/failure/success codes and command-reply sequences 11/05/03 1.5.0 (new development version) * Version 1.4.0 copied to start version 1.5.0. No code release. 11/05/03 1.4.0 * Updated README.windows with info for getting a small, free mail server for sending/forwarding mail out from the talker. 07/01/03 1.3.9 * Fixed race doing queue_flush_www(), where free_sock() could be called twice on a socket, causing a segfault. * Added bad socket check in free_sock() * Updated some of the rwho listings to current IPs * Removed hard-coded system name from EXT_WHO3 in hdrfiles/constants.h * Added some comments in hdrfiles/constants.h 06/08/03 * Updated Cygwin documentation in docs/README.windows a bit * Fixed very strict 'may be undefined' warnings for comm_cmds.c, server.c, write_funcs.c, check_funcs.c (so far only seen under Cygwin) 01/29/03 1.3.8 * Added do_stafflist() call to startup/reboots. * Moved do_stafflist() for ROOT_ID creation out of init_user(), and to do_login(), as while in init_user(), the ROOT_ID's userfile is not written to disk yet, and do_stafflist() reads user levels from disk. * Added do_stafflist() call to .reinit * Removed prototype declaration for getdomainname/gethostname under Cygwin. 12/26/02 * Fixed bug in send_mail where sending to all users (-a) put the -a in the mailed message. 11/22/02 * Added WEB_FORBIDDEN and WEB_SERVER_ERROR variables to constants.h. Added more file read/write failure checking in whowww_funcs.c. Added log entry for web_opt[]s when a .reinit is done. 08/03/02 1.3.7 * Added DO_TRACKING option to constants.h to easily set whether the talker should do tracking or not. 06/29/2002 1.3.6 * Added login limiting. This is, ip x.x.x.x will be auto-restricted when connecting more than y tiems in 1 minute. Default is 10. You can enable/disable this with LOGIN_LIMITING in constants.h * Moved ip address getting, to before motd. This is to facilitate ip restriction and login limiting checking * Added additional hostname restriction checking after we get a reply from the resolver clipon, because in the login we might not know the resolved hostname right away. * Modified check_restriction() to take an argument to check just IP or just hostname. * Changed resolver_clipon DNS resolution a bit. Message sent from talker to clipon now doesn't contain the SYS_LOOK_FAILED message, just a *, this is for easier parsing by the clipon and by the talker on getting a reply from the clipon (since this field wont ever contain spaces. The clipon now tacks a space onto the reply to the talker. The talker's read_resolver_reply function now will read the reply buffer until it's empty. This is in case the clipon sends a reply with more than 1 ip/host in it, which is possible under a lot of resolutions being done. Previously, more than one ip/host combo in a reply would corrupt a user's host info. * Made configure say what files were created, and also had it create a config.status file with the last successful configure command run. * Created new source file, set_funcs.c which contains the functions from server.c dealing with the .set command * Began moving informational setting commands to .set. Moved .desc to .set desc, .entermsg to .set entermsg, .exitmsg to .set exitmsg, .succ to .set succ, .fail to .set fail, .entpro to .set profile Created old_func() which will redirect the old syntaxes to the new functions, while telling the user that said old syntax will be de- precated soon and to use the new syntax. * Renamed succm() to set_succ(), failm() to set_fail(), exitm() to set_exitmsg(), enterm() to set_entermsg(), enter_pro() to set_profile(). Changed and copied helpfiles for said functions. 06/02/2002 1.3.5 * Fixed small glitch in send_mail where (on some systems) talker would segfault when you tried to email a non-existant user. Cause was a badly formatted log line. Only native to 1.3.4 05/21/2002 1.3.4 * Added multi-mails and friend mails to .smail (user,user,user and -f) * Updated smail helpfile. * Cleaned up send_mail() a little more. * Fixed typos and grammar errors in the tutorials. * Put prelim. probed terminal type under ".set show" for now. 05/04/2002 1.3.3 * Fixed glitch in exec_com where if users were online and the permission to write to the lastcommand file was denied when a user did a command, the talker segfaulted. * Added send_ext_mail() function to consolidate code and send external email out. (to smtp_funcs.c). Modified auto_expire(), fmail(), send_mail(), and mail_verify() to use this. Added level-based/mass-mail ability to send_mail(). See .smail helpfile on use. Multi-user mail to follow at some point. Cleaned up send_mail() a bit. * Stopped writing bad file I/O error to user if couldn't write to the last logins file, when they logged in. * Took epass argument out of mail_verify() and write_verifile(). In my_login() copied password to ustr[user].login_pass * Copied ustr[user].login_name to ustr[user].say_name in my_login() mail veri. 04/16/2002 1.3.2 * wrote helpfile for .set atmos (.h set_atmos) because there is no docs on how the atmosphere cycles, countdowns, factors work. * put check in .set atmos for WIZ_LEVEL or above. * really fixed the signal warnings this time on Mac OS X, and possible other OSes, by adding a check in the configure. * added preliminary telopt negotiation for terminal type. added user struct variables term_type and prev_term_type. Moved terms struct from main.c to constants.h 04/06/2002 1.3.1 * wizlist is now created on-the-fly. It will get updated whenever a promote or demote or .pcreate is done. added STAFF_FILE_HEADER to hdrfiles/constants.h Added function do_stafflist() * fixed --disable-optims in configure. Now it really does turn optims off! :) * added --enable-gcc-debug in configure. Will use -g when gcc is present. * added check for Darwin (Mac OS X) systems in configure * added override for Mac OS X systems for NET_SIZE_T to int. configure returns that it can use size_t, but cc complains about incompatible pointer type and the manpages and includes say to use int. *shrug* * prefixed SIG_IGN and SIG_ERR with (handler_t) as Max OS X spewed warnings about them not being functions. * fixed misc Mac OS X compile warnings * changed login function to my_login and echo function to my_echo to eliminate confusion with any internal C lib functions of the same name. * added "clipon" argument to ./shutdown script to kill the resolver clip-on 03/26/2002 1.3.0 (new development version) * Added fopen check to get_length(). Changed file read method from !feof loop to while fread. * Return bad request in parse_input() in whowww_funcs.c if get_length failed. * Return text/plain mimetype in get_mime_type() if filename doesn't contain a . * Moved check_var() function to check_funcs.c * Added %webport% substitution variable to hdrfiles/constants.h * Modified cat_to_www() to do variable substituion, and to only do it on html and text files. * Modified default index.html to use substitution variables for the system's name, host, webport. * Added code so that if you try to browse to a directory on the webport, it will cat the index.html file from that directory (if there is one), instead of show nothing * Replaced old javaclient with Dave Jarvis's java terminal emulator. Going to the webport at http://yourhost.com:webport/connect will automatically bring up a java window conencting to your talker. (it's actually the index.html file from the webfiles/connect/ directory, with host and webport substi- tution variables in it) * Updated COPYING, CREDITS, and README 03/11/2002 1.2.3 * Added fopen checks in some resolve_funcs.c functions that didn't have them. * Changed list_last to use file_count_lines() and file_skip_lines() instead of popen()ing to the tail program. I should be shot for waiting so long to update such a kludge! * Added IAC case for TELOPT_ECHO, just so it doesn't say it's unrcognized * Added newline before printed status after login/password prompt. * Added extra delete option to cmail/csent/wipe/wwipe/gwipe/swipe functions. To delete between lines. i.e. to delete from line 3 to line 6 you do: .cmail from 3 to 6 * Changed/Added "delete except lines" option for cmail/csent/wipe/wwipe/gwipe /swipe functions. Originally, to delete all lines, EXCEPT x to y, you would do: .cmail 3 6 (so that would delete all lines except lines 3 through 6) NOW, to do the same thing, it's changed to this format: .cmail except 3 to 6 You can also delete all lines except 1, using this: .cmail except 3 (delete all lines except line 3) The FORMER ".cmail 3 6" format will not still work for exceptions, it will now process it as if you were doing ".cmail 3" * Rearranged some configure stuff so that doing a --help does not remove your current hdrfiles/config.h file 03/04/2002 * Renamed datautils.c to datautil_funcs.c, signals.c to signal_funcs.c, and telopts.c to telopt_funcs.c * Moved some more specific functions from server.c to comm_cmds.c, fileutil_ funcs.c, and telopt_funcs.c * For LONGLOGIN_WHO, setting to 0 now disables "who" at the login prompt. 1 now does .swho, 2 does normal .who 02/25/2002 * Made the login process set the ROOT_ID to the highest level on every login. This is in case the admin created their character before setting themselves as the ROOT_ID. * Rewrote ".h new" and wrote a set of tutorials for new users, under ".h tutorial". Thanx to Jazzin for writing a couple of these. 02/24/2002 * Moved the helpfiles "wizguide" and "newwiz" to "staffguide" and "newstaff", respectively. Updated them to be more generic for a talker. Updated lib/newsfile with the new names. * Updated README, README.debugging, README.quickstart, and README.init_data in docs/ * Updated utils/no_make_compile script 02/20/2002 1.2.3b-pl5 * Fixed bug of talker seg-faulting when a SMTP conversation failed, after the free_sock() * Put new check in configure script to check if mkdir takes a mode argument. * Made fmail strip_color from the mailfile lines before it emails them out. Thanx to Jazzin for finding this. * Fixed "demote" helpfile because it said that you can specify the level to demote to. This is not true. Fixed wrapping lines on "help" helpfile * Wrote out messages to user doing grant/revoke notifying them of such. Thanx to Calysto for noticing this. * Put in main.c and resolver_clipon.c a default umask set of 066 for -rw------- permissions. * Made smtp conversation lines send \r\n because some cygwin implementations don't like to flush lines to the remote host with just \n *boggle* Thanx to Jazzin for figuring this combo out. * Moved .guess above .guru in the command list..assuming that .gu would be likely more used in hangman than as a shortcut for .guru * Changed resolver_clipon to read up to 3 nameservers from a /etc/resolv.conf file, as opposed to the previous behavior which was only 1. If a bad result is read (NOT an ip that doesn't resolve) or a resolution times out with a nameserver, the next will be tried. If it's configure that the fallback server should be the default, it will be put at the front of the nameserver list, to be tried first. 11/29/2001 1.2.3b-pl4 * Fixed bug of talker seg-faulting when wizport was turned off (WIZ_OFFSET set to 0) and talker was soft-rebooted. Cause was an FD_ISSET check on a socket set to -1. * Stopped adding listening sockets to the readmask set if they are 0. * Fixed glitch where in get_mailqueue_file, if the first fileget try failed, the next fileget put the new file in the MAIN talker directory (bad sprintf) 11/15/2001 1.2.3b-pl3 * Fixed possibility of new rwho implementation using a struct slot it shouldn't * Fixed some typos * Moved socket creation out of debug check (Forgot about this when i moved stuff) * Added ability to use SMTP (instead of sendmail/mail) to do external email. Mostly to allow external email to work on windows system, since sendmail/mail isn't normally available..you can specify an mail server ip and port. MAKE SURE YOU CAN RELAY THROUGH THIS SERVER! (e.g. your isp mail server) See comments for MAILPROG variable in hdrfiles/constants.h for more info. * Added smtp_funcs.c. Moved some alarm check_* funcs.c to check_funcs.c * Added --enable-smtp-debug flags to the configure program. Updated Makefile.in * Updated README.win95NT and renamed to README.windows 10/28/2001 1.2.3b-pl2 * Added EPIPE as ok to errno_ok() * Made resolver clipon only get suspend message when talker is set to use the clipon * Made talker execute shutdown(sock, 2); on Cygwin systems, as close() does not work. Created SHUTDOWN() function as a macro for whether to call the actual function or not. * In resolver_client, changed all close()s to CLOSE() * Changed tty detachment to do double-fork on Cygwin now, as it seems to be fixed. Moved socket binding and stdin/out/err redirecting 'til after the forks, as Cygwin would not bring up network the other way. * Changed header includes in our own resolv.h as using this on Cygwin tries to include files that don't exist. * Changed resolver_clipon to define _res on Cygwin systems, as Cygwin does not define it. * Change rwho implementation from fork() to select-on-socket non-blocking. Uses miscconn[] structure 09/13/2001 1.2.3b-pl1 * In a accept() failure, do an errno check to new function errno_ok(), Undocumented accept errors (such as ECONNRESET) may be non-fatal. * Update configure script to check for res_nmkquery in -lresolv * Update resolver_clipon.c for better portability * Make some unsigned longs just longs to satisfy a few compiler warnings. * Made talker REBOOT_A_CRASH now on non-signal fatals, such as select or accept failures. * Made talker catch a SIGUSR2 signal and do a .reinit on it * Updated shutdown script. -c does .reinit 08/22/2001 * Made kill_resolver_clipon() set FROM_SERVER_READ nad FROM_SERVER_WRITE to -1, because in some screwy situation they would stay at a number and then on a soft-reboot the clipon wouldn't get initalized/started. * Made a failed reboot remove the REBOOTFILE. * Added -l/listcache,-c/clearache options to the .resolve command so you could look at the entries in the cache and their TTL or clear the cache, from inside the talker. 08/10/2001 1.2.3b * Added configure script to try and figure out what things we need to compile with for OSes, what includes and functions it has, etc.. settings will be put in hdrfiles/config.h. Added a Makefile.in file which configure will use to create the Makefile. Run "./configure --help" for a list of options you can pass to it. Then run configure with the options you want (if any) YOU MUST RUN CONFIGURE TO GET A Makefile TO COMPILE THE TALKER Added an includes.h file to hdrfiles and now all C files include it and config.h * In a accept() failure, moved the FD_CLR() macro to inside the errno check statement..if we don't then it might modify errno and write_log() will contain innacurate info as to the reason for the accept failure * Fixed a glitch in the resolver clipon where a query that failed to start would return the result for a different slot than the one we want. Rare to hit if the clipon is querying a valid DNS server, but still possible. * Added our own snprintf function for systems that dont have it. SunOS to name one. Added our own ctime() function for systems that like to return corrupted time strings. OpenBSD to name one. 07/16/2001 1.2.3a-pl1 * Added additional code to check libc compatability for what we should use for socket length, socklen_t or int. Defined a type, NET_SIZE_T, which we set to whatever one we deem correct (or hope is correct). 04/14/2001 * Added a "help" keyword option to the login prompt. When entered at a login prompt, the user will be presented with help on how to login to the system, or create an account. Said text file path is defined in LOGINFILE in hdrfiles/constants.h and defaults to lib/loginhelp 04/10/2001 1.2.3a * Added a TTL field to the DNS cache entries. If you're upgrading from a previous version, you MUST remove your cache file (lib/sitecash) first, so they'll use the TTL field right from the get-go. Added MAX_DNS_TTL #define to constants.h (TTL explained briefly here) and new del_from_resolver_cache() function. * Added some filename fopen() checks in resolver_funcs.c * Fixed a glitch in the resolver clip-on code which failed to retrieve a valid resolution if a CNAME/A/UNKNOWN record was found before the resolution. 01/24/2001 1.2.3draft-14 * On shutdown/reboots, kill_resolver_clipon() was executing the kill without checking what the value of resolver_clipon_pid was. This is critical, because if the resolver wasn't turned on, the pid would be set to -1, and kill() would execute on -1, which has the effect of SIGTERMing every process the user owns, including shells, and possibly other talkers the user has running. Fixed. * Added BIND_INTER #define to constants.h. This lets you bind to a specific interface on a server with multiple interfaces. See constants.h for info on use. 01/09/2001 1.2.3draft-13 * When grants/revokes were read in, any lines <= 3 characters were disregarded as bad, but granting/revoking a single char command id, like .quit (0) IS only 3 chars (0 -) so we make the check just < 3 now, to fix this in read_user() and read_to_user(). 12/26/2000 1.2.3draft-12 * Removed code from shutdown functions that tries to remove .pid file. sysud() already does this for us. * Added write_log() of bad fopen(),opendir() to check_mess() and check_total_users(). Added also to abbrcount() and many other functions that may exit() on startup and not leave a note of their failure. If these failed on reboot for some strange reason, we would never see the perror() because stderr is closed. * Put additional checks in shutdown functions' reboot code when trying to dup() /dev/null and /dev/tty * Did a strip_color on the say_name in suname() notice message. * On soft-reboots, made talker ignore SIGALRM until new binary is started If reboot took a long time, SIGALRM would interupt the reboot and muck everything all up. * Made the RWHO: log entry log user who did the rwho and host:port tried to retrieve 12/05/2000 1.2.3draft-11 * Added code to have talker let resolver clip-on know when we're soft- rebooting so clip-on doesn't exit if it catches a SIGPIPE (when it tries to checkpoint with the talker and fails..thereby killing us all) 12/04/2000 * Added code to close user sockets before execing resolver clip-on in resolver_client.c. This fixes the condition of a user socket hanging on .quit if the clip-on was re-initialzed while they were online. * Added check_sockets() function to check status of sockets after reboot. This is to make sure they are still there and available, so select() doesn't die while reading a bad descriptor. 12/02/2000 * creply was writing the sender's message out to the receiver's tell buffer. Fixed. 12/01/2000 * Found formatting glitch in resolver clip-on. Fixed. 11/30/2000 * If user inputed a seach string to .who, the string would not match names with colors codes in them. Strip-colored the who lines before searching. * Added logging of pid with some log entries 11/29/2000 1.2.3draft-10 * Removed double at-sign stuff from code. gender,desc,fail,succ,exitm,enterm,afkmsg,user_quit,constants.h comm formats,www menu user changing. Added check to get_buf() to strip any existing ones when userfiles are read in. 11/27/2000 * Removed the green color wrapper from MAILFROM_USER in constants.h because colornames in there will be fine. * in bot_whoinfo() lowered the inpstr to compare it against .name instead of strip_color()ing the say_name. * took off-the-wall check out of set_recap() that prevented sane checking for an odd number of color carets. * dont strip_color() the bot log now 11/22/2000 1.2.3draft-9 * Seperated more code into smaller C files 11/15/2000 * Changed last_u() (.last) to check if person is invis and if doing user has authority to see if they're online..before sending out when they were last online/if they're online. C files CHANGED: server.c 11/10/2000 * Changed PARSE_END_PUNC options/functionality a tad. Setting to 0 will return a blank reaction, for people that dont want the reaction in their comm string formatting at all. 1 will return the default SAY_REACTION for everything, and 2 will do the parsing and return the proper emotional _REACTION. Changed prototype and some code for get_reaction. protos.h CHANGES: Changed char *get_reaction(char punc); to char *get_reaction(char *inpstr); C files CHANGED: server.c comm_cmds.c get_funcs.c 11/03/2000 * Starting to break code into more, smaller C files to decrease compile times and organize better, into categories. Will go into details and files that have changed when finished. 10/27/2000 * in ttt_new_game() if player was ignoring NERFS, it would say you couldn't play because user was ignoring tic-tac-toes. should checks TTTs, not NERFSs. Fixed C files CHANGED: server.c 10/26/2000 1.2.3draft-8 * Re-wrote bot to use select()/read() instead of ioctl()/read(). Initialized more signals, signal handling, prototypes for functions. Created a write_log() function like the talker's * Added a "+++++ WELCOME" message to server.c, to be sent to the bot on log-in. * Added a shutdown script to the bot directory. Modified compile script. * Modified Makefile to make all directories in a "make dist" with permissions of mode 700 C files CHANGED: server.c bot/storybot.c 10/25/2000 * Added own strptime() function called my_strptime() since not all OSes have a strptime(). * The bot's lastcommand wasn't going to the lastcommand file in the log directory, but the main directory. Fixed. * The talker wasn't sending the bot any further plus-messages after a soft-reboot. Failed to read his user number into the bot variable. Fixed. protos.h CHANGES: Added char *my_strptime(char *buf, char *fmt, struct tm *tmStruct); C files CHANGED: server.c strfuncs.c 10/19/2000 1.2.3draft-7 * Fixed Makefile so it would recognize changes to C files and recompile them. It wasn't doing this as of draft-6 * Fixed the cutoff of messages in write_str() when cols were set < 256. We forgot to reget the strlen() of the string AFTER color codes were put in. * Made read_rebootdb malloc the macro and conv buffers for the read in users. read_to_user() would crash the talker on soft-reboot otherwise. * Fixed writeall_str to clear out the str2 variable in the user loop. str2 used to be set once, but we changed it and put it in the user loop, but forgot to clear it out every time..as of draft-5 * Added code for the "NEW" '.set who' type. I was bored. We'll see how people like it. Added functions time_format_1() and time_format_2() to strfuncs.c protos.h CHANGES: Added char *time_format_1(time_t dt); char *time_format_2(time_t dt); C files CHANGED: server.c strfuncs.c 10/16/2000 1.2.3draft-6 * Moved source (.c) files to new directory srcfiles/ * Moved header (.h) files to new directory hdrfiles/ * Changed objs/ directory to objfiles/ * Changed Makefiles to take in account new locations of source files * Changes source files #include statements to take in account new locations of header files * Put macros in protos.h to try and use sys_errlist on systems that don't have strerror() * Removed calls to 'ad' and 'cd' variables of a DNS HEADER structure. They are not present in all BIND/DNS server versions. It's futile for us to check version numbers, since these variables really aren't needed by us. * Updated documentation in docs/ protos.h CHANGES: Added #if defined(_WIN32) && !defined(__CYGWIN32__) /* nothing */ #else #if !defined(_LP64) #if (defined(sun) && !defined(SVR4)) || defined(macII) #if !defined(strerror) extern char *sys_errlist[]; extern int sys_nerr; #define strerror(n) \ (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") #endif /* no strerror defined */ #endif /* not SYSV or mac */ #endif /* not _LP64 */ #endif /* not windows */ C files CHANGED: all 10/10/2000 1.2.3draft-5 * Added timestamp to writing of bot last command * Changed set_recap to take color codes in recaps. Expanded say_name user structure to length of SAYNAME_LEN, which is defaulted to 150. You shouldn't need to change this. extended mutter user structure to length of SAYNAME_LEN too. * Add ".ignore colornames" functionality * Modified comm. functions say() say_to_user(), to parse ending puncutation of inpstr if PARSE_END_PUNC is defined as >= 1. i.e. ? at end will put " asks". reaction is gotten with new function get_reaction(). Added to constants.h #defines PARSE_END_PUNC, SAY_REACTION, QUESTION_REACTION, EXCLAMATION_REACTION. * Added #defines VIS_SHEMOTE,VIS_SHEMOTE_P,INVIS_SHEMOTE, and INVIS_SHEMOTE_P for .shemote formatting * Now send non-colored names to bot, except for +++++ logon: and _who Changed bot code to pick these up, and also to use its internal user list more, rather than the names passed to it in the inbuf. * Fixed a bug in .pcreate that would segfault the talker in copy_from_user (present in draft-2 and up) * Made log entries of fork failures report the errno. * Updated helpfiles for .listen, .ignore, and .set recap protos.h CHANGES: Added char *get_username_from_delims(char *str, int pos); char *get_reaction(char punc); constants.h CHANGES: Changed #define NUM_IGN_FLAGS 24 to #define NUM_IGN_FLAGS 25 In user structure: char mutter[45]; to char mutter[SAYNAME_LEN]; char say_name[NAME_LEN]; /* 1.1.0 */ to char say_name[SAYNAME_LEN]; /* 1.1.0 - updated for color in 1.2.3 */ In comm formats: #define VIS_SAYS "%s says \"%s@@\"" #define INVIS_SAYS "* %s says \"%s@@\"" #define VIS_DIRECTS "%s says ^HR(to %s)^ \"%s@@\"" #define INVIS_DIRECTS "* %s says ^HR(to %s)^ \"%s@@\"" #define VIS_DIREMOTE "%s%s@@ ^HR(to %s)^" #define INVIS_DIREMOTE "* %s%s@@ ^HR(to %s)^" to #define VIS_SAYS "%s %s \"%s@@\"" #define INVIS_SAYS "* %s %s \"%s@@\"" #define VIS_DIRECTS "%s %s ^HG(^to %s^HG)^ \"%s@@\"" #define INVIS_DIRECTS "* %s %s ^HG(^to %s^HG)^ \"%s@@\"" #define VIS_DIREMOTE "%s%s@@ ^HG(^to %s^HG)^" #define INVIS_DIREMOTE "* %s%s@@ ^HG(^to %s^HG)^" Added {"colornames"}, to flag_names_type flag_names[NUM_IGN_FLAGS+1] #define COLORNAME 24 /* colornames */ #define VIS_SHEMOTE "& %s %s " #define VIS_SHEMOTE_P "& %s\'%s " /* possesive */ #define INVIS_SHEMOTE "& %s %s " #define INVIS_SHEMOTE_P "& %s\'%s " /* possesive */ #define SAYNAME_LEN 150 /* max username length with color codes */ #define PARSE_END_PUNC 1 #define SAY_REACTION "says" #define QUESTION_REACTION "asks" #define EXCLAMATION_REACTION "exclaims" C files CHANGED: server.c strfuncs.c datautils.c whowww.c 9/27/2000 1.2.3draft-4 * Made arrest require you to be a rank greater than the user you're arresting, or the ROOT_ID. Made sure gag_comm, muzzle, frog_user, and anchor_user operated like this too. * We now allow partial room names for .move * Now if you RE-LOGIN (not a NORMAL log off/log on, when you log into the talker when you're already on/hung) and you were in a private room, it will not reset the room back to public and it will put you back in there too. C files CHANGED: server.c 9/1/2000 * Updated resolver_clipon.c to do DNS recursion. Also to print out more query/answer debugging output. C files CHANGED: resolver_clipon.c 8/31/2000 * Added some more platform checks for setpgrp and glibc socklen_t * We include sys/types.h before sys/socket.h now to make FreeBSD happy. * Removed arpa/inet.h call from resolve.c and replaced with netinet/in.h * Made ctime and localtime prototypes in protos.h happier for FreeBSD protos.h CHANGES: Changed char *ctime(); to char *ctime(const time_t *); struct tm *localtime(); to struct tm *localtime(const time_t *); C files CHANGED: server.c resolve.c resolver_clipon.c 8/21/2000 1.2.3draft-3 * Added some prototypes for sunos/solaris * Added checks for function and macro existance to resolver_clipon code. Code would not compile on systems that already had certain macros or functions defined in the system include libs. * Updated README.solaris, README.quickstart, README.compiling, README.utils, and README * Fixed number of arguments passed to S_WRITE in resolver_clipon code. * Added USE_FALLBACK_AS_DEFAULT define to resolver_clipon.h. If set to 1, we'll use the fallback dns server instead of the local one to us. * Created a no_make_compile script in utils/ directory, to be able to compile the code on systems that don't have 'make' installed (ick) protos.h CHANGES: Added void tzset(void); char *strptime(const char *buf, const char *format, struct tm *tm); resolver_clipon.h CHANGES: Added #define USE_FALLBACK_AS_DEFAULT 0 C files CHANGED: resolver_clipon.c 8/16/2000 1.2.3draft-2 * Fixed a glitch in read_resolver_reply() in the way resolver clip-on output was read. This caused answers from the clip-on to sporadically not get parsed into the users * Made area conversation buffers malloc()ed structures instead of static. This will save quite a bit of memory on talkers that dont have a lot of rooms, since memory will only be allocated for the number of rooms defined in init_data, instead of MAX_AREAS. * Made user Macros buffers malloc()ed structures instead of static. This will save quite a bit of memory since memory will only be allocated for a user when logged in. * Changed user Macro structure. Instead of using multiple structure instances containing single arrays, we now use a single structure containing multiple arrays. * conv_mem_get and user_mem_get now takes a mode argument to calculate allocated and used memory. * in read_init_data() added code to cleanup rooms that are not used when a .reinit is done for less rooms that were being used. i.e. if 10 rooms were in use and then admin defined only 5 rooms and did .reinit, we now cleanup rooms 6-10. We also kick users in previous rooms, back to main room, since they no longer exist! * changed the email address for code tracking to tinfo@asteroid-b612.org protos.h CHANGES: Added void addto_conv_buffer(ConvPtr buf, char *str); void init_conv_buffer(ConvPtr buf); void write_conv_buffer(int user, ConvPtr buf); void init_macro_buffer(MacroPtr buf); Changed long conv_mem_get(void) to long conv_mem_get(int mode) long user_mem_get(void) to long user_mem_get(int mode) constants.h CHANGES: Added #define macro #define MY_SIZE(buf,mode) (mode==0?strlen(buf):sizeof(buf)) Added area conversation buffer structure typedef struct { int count; char conv[NUM_LINES][MAX_LINE_LEN+1]; } ConvBuffer; typedef ConvBuffer* ConvPtr; Added "ConvPtr conv;" to astr[] structure Changed "Macro Macros[NUM_MACROS];" to "MacroPtr Macros;" for ustr[] strcuture Changed user macro buffer structure to typedef struct { char name[NUM_MACROS][12]; char body[NUM_MACROS][MACRO_LEN+1]; } MacroBuffer; typedef MacroBuffer *MacroPtr; C files CHANGED: server.c datautils.c strfuncs.c 8/11/2000 * kill_resolver_clipon() now resets resolver_clipon_pid to -1 * added RESOLVER_DEBUG define to Makefile * updated README.dns_resolving 8/1/2000 1.2.3draft-1 * draft refers to a draft release. It's not even alpha. It'd just the latest development stuff. * add prototypes for resolver_client.c to protos.h * removed request_cache_lookup from resolve.c and protos.h * removed SITE_WIDE* stuff from resolve.c and constants.h * moved nonblock search code from server.c to constants.h * added code to server.c and resolve.c where /* CYGRESOLVE */ comments are in main select scan and where resolving commands are for new connections * added resolver_clipon.h header file * modified Makefile to compile in resolver_client.c * modified Makefile to compile in resolver_server.c clip-on * modified Makefile to hold default HAVE_NAMESER, HAVE_RESOLV and HAVE_NETDB defines * changed server.c to not use bzero anymore since it's a deprecated function * included nameser.h and resolv.h includes into the distribution for resolver_server.c in case operating system doesn't have them (dunno if this will remedy on all systems) * changed resolve option in constants.h to have the site-wide cache option be the clip-on resolver option now (I've decided not to pursue the site-wide option anymore) * added SYS_LOOK_PENDING to constants.h * updated docs/README.init_data for new resolve option * redefined HEADER in constants.h as YES_HEADER so we can include constants.h into resolver_clipon.c without declaration problems. updated whowww.c to reflect change * NEED to update docs/README.dns_resolving 7/21/2000 * Put a few lines in to make min and idl variables 0 even if they calculate to < 0 (which they shouldn't :)) C files CHANGED: server.c 7/14/2000 * Changed ctime() calls in t_who() to get_time(0,1) so carriage return in time didn't mess up text if admin decided to put text after it. C files CHANGED: server.c 7/13/2000 * Changed get_user_num() call to get_user_num_exact() in .kill to prevent sub-string user matches so user's can't echo substring usernames to the bot and get it to .kill people with obsenities * added errno info to bad read() in the bot's own code. C files CHANGED: server.c bot/storybot.c 6/21/2000 1.2.2 * Removed commented/phased out code and released as final 1.2.2 version 6/9/2000 * If the talker crashes and lastcommand.CRASH exists, it will be appended to so it has a record of all lastcommands for multiple crashes * In t_who() if idl variable is < 0, we set to 0 5/31/2000 1.2.2b-3 * Changed format of .permission a bit. First argument is now instead of add|sub. Permissions now have extra flag of "X". "N" now means normal access, "Y" means special access, and "X" means no access (unless invited). Because of this change the add|sub options to .permission do step-clearance now. Meaning, if the user has "N" access, and you "add" more access, they get "Y". If they have "Y" access and you "sub" them, then get "N", if you "sub" them again, they get "X". Then they would need two "add"s to get back to "Y" again. Allowed/Denied list now formatted better, with less blank lines and spaces Read helpfile. * Phased out .igtells. Moved to a .ignore option, ".ignore tells" and ".listen tells" respectively..setting WILL be saved on logout. Removed igtell flag read and writing from reboot DB. The igtell user structure variable is now called tempnum1. * modified user_wants_message() to take -1 as a user argument for getting a setting for a non-online user after a read_user() (as in usr_stat()) * Made a few minor changes to the bot code. Also changed the compile and restart scripts to use just /bin/sh protos.h CHANGES: Removed void igtells(int user); void heartells(int user); constants.h CHANGES: Replaced under user structs int igtell; with int tempnum1; /* 1.2.2 - temp - was igtell */ C files CHANGED: server.c datautils.c 5/4/2000 * Fixed bug in read_rebootdb() where ustr[].login_name wasn't read back in. We just copy the read-in ustr[].name to it. * Removed BOT_ROOM define in constants.h. In server.c instead of comparing the bot room to the room the current user is in, i now compare the room the user is in to the room the bot is in. This lets him move around the talker out of his room and still read/listen and respond to actions/conversation. the special cases of blank-say-is-a-review and "help" triggers bot-help now follow the room he is in. * Put standard +++++ notifications into the communication functions the bot understands. i.e. if a user does a .tell to the bot, instead of using whatever format the talker is set at by the admin, the bot gets a: +++++ comm_tell: username_that_said message notification. this frees anyone from having to modify the bot's code if they change the communication's formats from the distribution defaults! * Made bot not get +++++ REBOOT on a soft-reboot * Updated documentation README.compiling, BUGS, BETA-TODO, CREDITS, added LAFK and BAFK to the .who helpfile constants.h CHANGES: Removed #define BOT_ROOM "pond" C files CHANGED: server.c 5/3/2000 * Change %y to %Y in the backup code because some C libs gave a harmless warning saying it generates only a 2 digit year. I knew that! I didn't need it to warn me about it! And I hate warnings, even harmless ones, so i made it happy. :-) * Fixed a glitch in make_sockets(). Setting a port offset to 0 and trying to soft-reboot the talker would kick some or all of the users off, when it shouldn't kick any off. * Added function do_tracking() to consolidate code for sending UP and DOWN tracking info for the talker. See function code for use. * Added function do_timeset() to consolidate local timezone setting on bootup and in systime() Also, found a very odd truth regarding the setting of the TZ enviromental variable. I noticed this on glibc systems where the set TZONE timezone would be reverted back to the normal machine clock! After furthur research it was determined that when setting an char array to define TZ and then putenv()ing that array to set the environment, any furthur modification of the array resulted in the automatic change of the environment to that modification, without needing to do a putenv() again! This, to me, is ludicrous! If i used the array "mess" and then did mess[0]=0; after the putenv(), the TZ variable would disappear from the environment! But, according to the standard, it can't be touched..who am I to argue with standards? :) the do_timeset() function along with a static char array fixes this. NOTE: this fix only affects people that change TZONE from localtime and that TZONE is different from local machine time. protos.h CHANGES: Added void do_tracking(int mode, char *downmess); void do_timeset(char *zonetime); C files CHANGED: server.c 5/2/2000 * Replaced tm/time(&tm) usage with time(0) where the tm structure was not needed. This should save some CPU cycles and make time calculations a tiny bit more accurate. C files CHANGED: server.c 4/24/2000 * defined SOCKET_ERROR for unix-type systems. Took out #if's for SOCKET_ERROR/-1 mixing * Took nstat reference out of nerf helpfile. Removed nstat helpfile. * Updated cygwin info in docs/README.win95NT 4/3/2000 * Added SHOW_SREBOOT #define to constants.h. See file for details on use. * Moved some logging of reboots around constants.h CHANGES: Added #define SHOW_SREBOOT 2 C files CHANGED: server.c 3/30/2000 * Changed solaris prototype for bcopy() protos.h CHANGES: void bcopy(const void, void, size_t); IS NOW void bcopy(const void *, void *, size_t); 3/28/2000 * Added a simple write_log() of the changing of .quota number C files CHANGED: server.c 3/27/2000 * Changed .whois to take input string format of or @. See updated helpfile. C files CHANGED: server.c 3/10/2000 * THe bot was broke with a change i made in write_bot()/write_bot_nr() It would not output ANYTHING to him/her/it..fixed now. C files CHANGED: strfuncs.c 3/5/2000 * Added the function getonechar() and macro defines rchar() and wchar(). These are used to read and write the attach_port character in read_/write_rebootdb, because using rvale/wval is invalid and reads/ writes wrong values. * Added some \n's in write_log()'s that i missed constants.h CHANGES: Added #define wchar(val) fprintf (f, "%c\n", val) #define rchar(val) val=getonechar(f) protos.h CHANGES: Added char getonechar(FILE *f); C files CHANGED: server.c 2/28/2000 * Added clearing of some more variables in reset_user_struct and init_user_struct C files CHANGED: datautils.c 2/25/2000 * Added VOTE_LEVEL define. This will replcae the requirement for user to be ROOT_ID to view tallies and MAX_LEVEL to do -c or -d. Updated helpfile constants.h CHANGES: Added #define VOTE_LEVEL 3 /* level that can do -c and -d and read tallies on votes */ C files CHANGED: server.c 2/19/2000 * Added README.vt100stuff to docs/ directory, just a little reference. * Added "top" option to .clist and some top sub-options. See command. C files CHANGED: server.c 2/14/2000 * Updated documentation. Added README.quickstart doc. Updated TODO a little. 2/1/2000 (devel: b start of beta & feature-freeze) * Added mode to reset_user_struct(). mode will determine if all structs get reset or just some (actually ALMOST all). Added reset_user_struct() to a few places where structs were reset in the function. Most notably user_quit() * Fixed a minor race where 2 users of the same username could be created if in the login process at the same time. Now, whoever gets to the password prompt first, wins. Added check_for_creation() (1/4/2000) * Changed conditions on email verification creation a bit. Previously if emailver was on, a user requested verification, then emailver was turned off, when the user came back, it'd still act as if emailver was on 'cause they were in the verification DB. Now, when they come back they will be treated like a normal user. When the talker is booted with emailver off or emailver is turned off in the talker, AND a verification DB exists, the DB will be removed. * Phased out print_to_syslog() and logerror() functions. Replaced with write_log() which will write to specific logs and take variable arguments. write_log() was under construction and in server.c. Now put in strfuncs.c Logged more errors and try to log errno wherever possible now. Lastlogs file will now be in the log directory, as will the lastcommand. (1/18/2000) * Added directory "logfiles" * Added #include to strfuncs.c so write_log() can use variable argument functions. * Changed promote() so ROOT_ID can promote to same level even if PROMOTE_TO_SAME is set to 0 (From joelie) (1/5/2000) * player_create() changed to use a ustr[user] type struct to do it's variable setting instead of t_ustr. We do this so we can use reset_user_struct() to cut down on duplication of the resetting of all user variables before we set them to defaults. We also now use init_user() to set the new user to system defaults as much as possible. (1/4/2000) * Reset some other user structures in various places. Removed some unneed code in login() due to a bit better function usage (1/4/2000) * Put bot!=-5 check in write_bot() and write_bot_nr(). Without it it would crash on cygwin32. (1/5/2000) * Removed from server.c since child wait stuff is in signals.c now (1/5/2000) * Moved frags/ into utils/code_fragments and www/ into utils/javaclient (1/5/2000) * Put comments before auth_xxxx() functions and rearranged their flow according to execution. Re-coded parts of them to use better methods to set non-blocking and to check for readability/writability. Added error logging. Added write timeout variable. THere was no sense to have a read timeout variable if you're gonna select() the writability of the socket forever, Arctic! write timeout set to 6 seconds. read reset to 3. (1/7/2000) * Set all ports to be passed as (unsigned short) to htons() (1/7/2000) * Set bootup to get logged even if we're in debugging mode. ** System running ** message will not show in debugging mode. (1/7/2000) * Zeroed ALL bind addresses before creating in make_sockets() (1/7/2000) * Changed user_quit() to kill() a child remote who if it exists for a user, instead of waiting for it to die before closing the connection. If a user was in a remote who and a shutdown was performed, the shutdown would hang until the child exited..not exactly the behaviour we want (1/11/2000) * Jazzin pointed out that if you were afk, then did a remote who, the "you're back" message would print twice. This was caused by us not forcing a flush of the user's queue before the fork(). Also, the "you may play while you wait" message would not show up until the remote who succeeded/failed, for the same reasons. Fixed. (1/11/2000) * Added define checks for OpenBSD to get rid of some socket call and ANSI C warnings. Thanx for the OpenBSD account, ziffnab. (1/12/2000) * Added logfiles directory creation in Makefile "dist" section * Updated README.compiling * Added functionality for soft-rebooting. This will reboot the binary without disconnecting the users or losing their current information (I guess you could call it hot-rebooting) User data will be written to a db, binary executed, then db read back into the proper user slots. The -r option of shutdown will now do soft-reboots. -h will now do the previous hard-reboot. Soft-reboot sets a "restarting" variable, so listening sockets dont get reopened with the new binary, since they don't get closed to begin with. Changed the outputting of some messages and colsolidated some if()s in check_shut() Added define REBOOTFILE, which is the db that will be written, read, then removed on soft-reboot. Updated shutdown helpfile. (1/15/2000) * Modified "help" helpfile (.h help) to be a short guide to the help system and to the syntaxes of commands in the command's helpfile. (1/15/2000) * Had check_var check for hostname and main port var. See HOST_VAR and MAINPORT_VAR * Tweaked out soft-rebooting some more. (1/17/2000) * restart, shutdown, and helpfiles/TOP now run from sh instead of csh * If we go down or reboot from an error (shutdown_error()) we're gonna try and move the lastcommand file to lastcommand.CRASH * Added backup_logs() function which will get called from check_mess() at midnight to backup/rename all logs to a new subdirectory under LOG_DIR Added trim_backups() function which will also get called from check_mess() at midnight to trim logs to x days (set as TRIM_BACKUPS). Called by staff as .backup (function backup_stuff()) Added option to init_data to set on or off initially. Added .backup helpfile (1/18/2000) * modified/enhanced .readlog to take in account new log file format/writing. Added 2 temp. user structures log_stage and temp_buffer. log_stage will hold the log number we're reading while in cat() prompting. temp_buffer will hold the search string/number of lines. These are needed because the user may specify to cat/search all files, which requires us to return into the function on our own (w/o user intervention) after each file is catting. Updated helpfile (1/19/2000) * changed the ranks structure. This now contains the fields lname (long rank name), sname (short rank name), abbrev (1 letter/number/character abbreviation), and odds. Changed .who listing to use abbrevs and/or short name where appropriate. Removed old RANKS define, odds[], and ranks[] arrays. (1/19/2000) * changed the way partial queue flushes are done. j_mess no longer used, because of the limited size. output_size now is alloced_size the total size we want to send..this doesn't decrese. new temp user struct variable write_offset contains how far we are in write()ing. debug messages for queue flushes and queue_writes no longer contain the buffers. (1/25/2000) * rechecked the string-terminating character in get_input(). We should be able to handle CR, LF, or CRLF. Added some code to try and do this. (1/24/2000) * tweaked soft-rebooting. make_sockets is now done after everything else (but before forking). reboot db is read before make_sockets() This is so if the talker is compiled and soft-rebooted with port offsets different than the previously running binary, the ports can be open or closed. i.e. binary was running with WHO port open, then compiled with WHO offset of 0, meaning closed, soft-reboot done, talker detects port was open but needs to be closed for new boot, so closes it (1/25/2000) * added some checking in get_input() for read() returning -1. If a network error, we call user_quit() silently (no output to user) and forego any furthur socket flushes. This should get handle most of the "Broken pipe" errors from write() which are normal, but just annoy me. BE ADVISED, for silent mode user_quit() now has a new "mode" parameter passed to it! (1/27/2000) * added GRANT_TO_SAME define to constants.h to let your determine whether or not you want to let users grant or revoke commands OF THEIR LEVEL to/from users (2/1/2000) constants.h CHANGES: Replaced #define LOGFILE "syslog" with #define LOGDIR "logfiles" Replaced under user and www structs int output_size; with int alloced_size; Changed #define LASTLOGS "lib/lastlogs" to #define LASTLOGS "lastlogs.log" Added /* Log facility definitions */ #define VEMAILLOG 0 /* email verification */ #define LOGINLOG 1 /* connect and login log */ #define WARNLOG 2 /* warning and security log */ #define ERRLOG 3 /* error log */ #define BOOTLOG 4 /* bootup/shutdown log */ #define SYSTEMLOG 5 /* general system log */ #define BANLOG 6 /* site/user restriction log */ #define DEBUGLOG 7 /* debugging log */ #define NOTIME 0 /* don't timestamp log entries */ #define YESTIME 1 /* timestamp log entries */ #define TRIM_BACKUPS 3 /* days to trim backup logs to */ #define NO_CREATION "Someone is already in the process of creating that username. Try again." #define BAD_FILEIO "Failed! A file I/O error occured!" #define BAD_MALLOC "Failed! A memory allocation error occured!" #define REBOOTFILE "REBOOT.db" #define HOST_VAR "%host%" #define MAINPORT_VAR "%mainport%" #define GRANT_TO_SAME 0 /* allow granting and revoking commands */ /* to/from users of the same level */ log_struct typedef struct and logfacil define of struct int log_stage and char temp_buffer[80] to user structure rank_struct typedef struct and ranks define of struct Added under user and www structs int write_offset; Moved from server.c #define WIZ_ONLY -4 #define NORM 0 #define BOLD 1 Removed #define VEMAIL_L 0 #define LOGIN_L 1 #define ERROR_L 2 #define WARNING_L 3 #define SYSLOG_ALSO 1 #define NEWLINE 1 #define NONEWLINE 0 #define EMAILLOG "logs/emailver.log" #define LOGINLOG "logs/logins.log" #define ERRORLOG "logs/errors.log" #define WARNINGLOG "logs/warnings.log" #define RANKS int odds[]; char *ranks[]; text.h CHANGES: none protos.h CHANGES: void reset_user_struct(int user); IS NOW void reset_user_struct(int user, int mode); void write_log(char *str, int type, int nl); IS NOW void write_log(int type, int wanttime, char *str, ...); void user_quit(int user); IS NOW void user_quit(int user, int mode); Added int check_for_creation(ustr[user].login_name); Added void read_rebootdb(void); Added void write_rebootdb(int user); Added void user_hot_quit(int user); Added int backup_logs(int user); Added void backup_stuff(int user, char *inpstr); Added void trim_backups(int user, int days); Removed void logerror(char *s); Removed void print_to_syslog(char *logstr); authuser.h CHANGES: extern char *auth_tcpuser4() IS NOW extern char *auth_tcpuser4(register unsigned long inlocal, register unsigned long inremote, register unsigned short local, register unsigned short remote, register int wtimeout, register int rtimeout); extern char *auth_sockuser2() IS NOW extern char *auth_sockuser2(register int s, register unsigned short local, register unsigned short remote, int rtimeout, int wtimeout); C files CHANGED: ALL 12/15/99 Added logging of auto-expires, auto-expire nukes, manual-expire nukes, and auto-nukes 12/01/99 (devel: pl5) Rewrote the way data is written down to a www socket, just like the user sockets (5/10/99 entry). The web port wasn't working on glibc, but worked fine on libc5. Added relevant variables. * Added code and changes to wwport after get_input() call in server.c * Added cat_to_www() function, modified parameter to user instead of sock in server.c * Modified free_sock() to reset output_data and output_size in server.c * Modified init_misc_struct() to reset output_data and output_size in datautils.c * Added write_str_www(), queue_write_www(), queue_flush_www() in strfuncs.c * Change cat_to_sock() call to cat_to_www() in whowww.c * change write_it() calls to write_str_www() with user pass instead of sock pass in whowww.c * change external_www() call to pass user instead of sock. * expanded size of wwwport[].file by 12 to support adding on of server type to be parsed later * added new realloc macros and add new data on to malloced user/wwwstructure using memcpy() * Included string.h instead of strings.h for linux * defined __STRICT_ANSI__ before including sys/socket.h on glibc systems since it produces a warning due to a glitch in the system include file. * www reading was changed so that the head GET line isn't parsed until after the browser sends a blank line..this is how it's usually done. Previously, we read right after we got the head line in. * updated TODO, README.win95NT, and helpfiles for ".site" and ".cline" constants.h CHANGES: Added char *output_data and int output_size to wwwport structure text.h CHANGES: none protos.h CHANGES: Added void write_str_www(int user, char *str, int size); Added void queue_write_www(int user, char *new_str, int length); Added int queue_flush_www(int user); Added int cat_to_www(char *filename, int user); void external_www(int as); IS NOW void external_www(int user); void queue_write(int user, char *queue_str); IS NOW void queue_write(int user, char *queue_str, int length); authuser.h CHANGES: none C files CHANGED: ALL except telopts.c 11/12/99 Added ifdef check for setpgrp on OSF/Digital systems. Digital requires arguments passed to setpgrp(); Include or in resolve.c depending on system. Fixed warning in systime() of passing strlen() calculated values to a field width on systems that dont define a strlen() return as int. Fixed some warnings in whowww.c of passing strlen() values to a conversion on systems that dont define a strlen() return as int. 11/8/99 Added trimbackups.c script to utils directory. Compile with "make all" or "make trimbackups" This program is used to remove backups older than days specified on command line. Type program by itself for arguments it requires, or see updated README.backups file. Removed rm -f server.pid from restart script. Talker overwrites the file on startup. 8/24/99 (stable: pl3 devel: pl4) Fixed memory overwrite in .wlog that causes a segfault when staff gives a long inpstr. Fixed glitch in revoking .say where the first word of chat was cut off. constants.h CHANGES: MAX_WWW_CONNECTS now should default to 5 text.h CHANGES: none protos.h CHANGES: void say(int user, char *inpstr); IS NOW void say(int user, char *inpstr, int mode); void external_users(int user, int mode, char *query); IS NOW void external_users(int user, int mode, char *query, int photofilter); authuser.h CHANGES: none 8/4/99 pl3 (stable: pl2 devel: pl3) Fixed a glitch that let users with .say revoked still say messages as long as they just typed it and didn't use .say Made it so that if a user has .wiztell revoked they wont see wiztells either. Also if they have .wiztell granted, they will also see wiztells. Made it so that a .greet with special characters errors out instead of showing the room just blank lines. constants.h CHANGES: none text.h CHANGES: none protos.h CHANGES: none authuser.h CHANGES: none 7/12/99 pl2 Fixed a bug that caused the talker to segfault on blank username file open. Should C really allow a directory to be opened with fopen()??? tinfo tracking now sends process PID too to be sure it updates the right talker entry (in case multiple running with same SYSTEM_NAME) Fixed hole in .site which allows . (dot) files to go through and segfault the talker. 7/1/99 1.2.2a-pl1 Made code more compliant with glibc2. It was segfaulting in an FD_ISSET when it tried to check for a socket in a writemask, and the socket wasn't being used. Changed get_input() to a return type of int (was char *) and evaluated return value in switch statement. If socket is -1 after get_input the user is gone and no need to check for the socket in the writemask. Removed DEBUG define. To make talker NOT fork to background for debugging, just use the -d switch on the command line. i.e. ./server -d or ./server -d Added function get_iac_string to return string versions of IAC numbers to the system log. Made it so that you can abort a talker addition (.talker -a) by typing a q/Q by itself on any entry line. Made it so that a \n isn't written to the end of the addition prompts. Updated compiling README, TODO, and CREDITS 5/28/99 Cleaned up a few glitches. Put DEBUG define's in Makefile instead of in .c files. Put all main external who/www functions in whowww.c Finished POST method for web port. Added _login function to web port Started adding functionality to web port login to allow reading and changing of a user's preferences. 5/10/99 Added count calculation in t_who() for friends .who formatting. Thanx Joelie. Added brackets around in if in syssign(). Function was telling bot twice that a user was logged in. Thanx Joelie. Rewrote the way data is written down to a user socket. Inspired by a problem with gmud, where the talker sends data faster than the client is ready to receive it. We now use select to poll the user sockets for WRITEability. until a user socket is marked as such by select(), data will be queued up in a malloced/realloced user structure ustr[user].output_data. When marked, all data will be sent down it possible. If only some goes, the rest will go when the socket is next marked writable. malloced space will be freed when struct is empty. This works but is still in testing for problems/memory leaks. Added funcs queue_write() and queue_flush() 5/4/99 .to direct emote/possesive emotes now handle spaces better. Also, if user you're .to'ing to is invis, they will show up as so as per INVIS_TALK_LABEL. Made the code so that if you set a port offset (i.e. WIZ_OFFSET,WWW_OFFSET,WHO_OFFSET) to 0 that port wont bind/listen/startup on talker boot. modified functions main(), make_sockets(), and system_access() to make this work. Fixed .sthink where the output wasn't being written to the user's conversation buffer. Little thing i forgot to put back in. 4/25/99 1.2.1 Updated and added all relevant helpfiles. Added timestamps to restricts and unrestricts in logs, and logging of creation attempts from bannewed sites. Changed format of default ".set" listing. options now shown in 2 columns with no descriptions to save space. Help for options still under .h set_