-------------------------------------------------------------------------------
ChangeLog
-------------------------------------------------------------------------------

Sat Feb 10 21:58:33 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * README: Added a note that users should remove their old files,
   especially ~/.htsserver/*.

 * data/htsserver.lsm.in: Updated package size.

 * docs/HACKING: Simplified the CVS section.

 * Released as 0.5.9.

Sat Feb 10 20:45:17 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * README: Further improve the 'Compiling and Installing' section.

 * TODO, docs/htsserver.conf.5.in: Updates.

 * docs/FEATURES: Updated to reflect the latest plans.

 * docs/HACKING: Typo.

 * docs/PROTOCOL: Updated to reflect reality. Reworded lots of expressions.
   The syntax of delplayer changed. Added/removed reply-codes as neccessary.
   Documented player_remove, transporter_arrived and transporter_left.

 * docs/htsserver.6.in: Beautyfied manpage. Added htsserver.conf(5) and
   nhtsclient.conf(5) to the 'SEE ALSO' section.

 * docs/htsserver.6.in, src/cmdline.c, src/cmdline.h: Changed the commandline
   option -l to -D, which is the same as --logdest. We use -l for the logfile
   location (--logfile) now.

 * src/cmdline.c: Fixed a bug which prevented --logfile to work as expected.

 * src/protocol.c: The command delplayer now either takes a player ID or
   a playername as first argument. The commands save and load now return
   '500 Savegame support is not yet implemented.'.

Sat Feb 10 17:44:56 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * NEWS: Updates.

 * README: Improve the 'Compiling and Installing' section.

 * configure, configure.in: Set release-date to February 10, 2001.

 * docs/PROTOCOL, src/protocol.c: Added reply-code 556 from the command
   transporter_drive.

 * src/htsserver.c: If we abort because the default adminpassword is still
   set, we provide the user with the location of the configfile.

Fri Feb  9 18:56:10 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * src/cmdline.c, src/protocol.c: Use g_strcasecmp() instead of
   g_strncasecmp() where possible.

 * src/log.c, src/net.c, src/protocol.c:
   Fix even more possible format string vulnerabilities.

 * docs/HACKING: Added URLs of autoconf and automake.

Thu Feb  8 20:35:13 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * README: Better installation instructions. Added Quickstart section again.

 * TODO: Updates.

 * config.h.in, configure, configure.in: Simplified the check for socklen_t
   by using AC_CHECK_TYPE.

 * docs/HACKING: Added section 'Tools'.

 * docs/PROTOCOL, src/protocol.c: Fixed typos.

 * src/cmdline.c: Fix possible format string vulnerability.

 * src/common.h: Use HAVE_STDLIB_H.

 * src/cmdline.c, src/net.c: Cosmetic changes.

Sun Feb  4 15:56:19 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * Makefile.in, aclocal.m4, config.h.in, configure, configure.in, install-sh,
   missing, mkinstalldirs, data/Makefile.in, docs/Makefile.in, src/Makefile.in:
   Update to autoconf 2.49c and the most recent CVS automake (which will
   eventually be automake 1.4c). Removed check for pwd.h as we don't use it 
   anymore. Remove check for string.h, strings.h, memory.h and unistd.h,
   because this is already checked by an autoconf macro. Use AC_CONFIG_FILES
   and AC_OUTPUT.

 * README, data/htsserver.lsm.in: Cosmetic changes.

 * docs/htsserver.conf.5.in: Document that numbers and digits must *not*
   be enclosed by double quotes. Better explain the adminpassword option,
   and urge the user to change the default password.

 * src/common.h: Consistently use #if instead of #ifdef. Remove inclusion of
   pwd.h.

 * src/depcomp: Added file (generated by automake).

 * src/protocol.c: If anyone tries to use 'reconfig' send a message that this
   command does not work in this release.

Sat Feb  3 15:06:51 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * data/htsserver.conf.in: The syntax of the logdest command changed.
   It now takes either 'file' or 'syslog' or 'none' as argument.

 * docs/htsserver.conf.5.in: Document the default values of the options.

 * src/cmdline.c, src/cmdline.h, src/conf.c: Added code which ensures that
   the commandline options take precedence before the equivalent configfile
   options.

 * src/connections.c, src/net.c, src/players.c: Cosmetic changes.

 * src/servercmds.c: send_player_logged_out() now only sends the
   server-command 'player_logged_out' if the player really was logged in
   before.

Wed Jan 31 18:09:05 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * docs/htsserver.conf.5.in: Added file.

 * NEWS: Updated for 0.5.9.

 * README: Correct installation instructions.

 * TODO, config.h.in, docs/HACKING: Small fixes.

 * README, data/htsserver.conf.in, src/cmdline.c, src/cmdline.h, src/common.h,
   src/conf.c, src/conf.h, src/connections.c, src/connections.h,
   src/defaults.h, src/file.c, src/file.h, src/goods.c, src/goods.h,
   src/htsserver.c, src/htsserver.h, src/log.c, src/log.h, src/misc.c,
   src/misc.h, src/net.c, src/net.h, src/players.c, src/players.h,
   src/protocol.c, src/protocol.h, src/savegame.c, src/savegame.h,
   src/servercmds.c, src/servercmds.h, src/towns.c, src/towns.h, src/trade.c,
   src/trade.h, src/transporters.c, src/transporters.h:
   Update Copyright lines to 1998-2001.

 * configure, configure.in: Now we require autoconf 2.49b. Create the
   manpage htsserver.conf.5.

 * docs/Makefile.am, docs/Makefile.in: Added the manpage htsserver.conf.5.

 * src/goods.c, src/players.c, src/protocol.c, src/towns.c, src/transporters.c:
   Fixed several format string vulnerabilities.

 * src/htsserver.c: Do not startup htsserver if the default adminpassword is
   still used. Urge the user to change adminpassword.

Tue Jan 16 22:35:50 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * docs/HACKING, docs/htsserver.6.in: Cosmetic changes.

 * src/servercmds.c, src/servercmds.h: Added send_transporter_left().

Thu Jan  4 19:02:56 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * src/cmdline.h: Cosmetic changes.

 * src/players.c, src/players.h: player_new() now takes a 'logged_in' argument.

 * src/protocol.c: Call the new send_player_remove() in h_delplayer().

 * src/servercmds.c, src/servercmds.h: Added send_player_remove().

Tue Jan  2 17:17:13 CET 2001 Uwe Hermann <uh1763@hermann-uwe.de>

 * src/towns.c: Set minium price to 5. Before, it was set to 0, which is
   bad, as we don't want to give away stuf for free :-)

Sun Dec 31 22:32:57 CET 2000 Uwe Hermann <uh1763@hermann-uwe.de>

 * src/players.c, src/players.h, src/servercmds.c:
   Renamed the is_logged_in member of player_t to logged_in.

 * src/protocol.c: Set player->logged_in to YES/NO in h_login() and h_logout().

Sun Dec 31 17:14:26 CET 2000 Uwe Hermann <uh1763@hermann-uwe.de>

 * docs/PROTOCOL: Major changes. Reply-codes of 'login' and 'transporter_drive'
   changed. Added another reply code group (6: Game data and information).
   Removed server-commands 'init' and 'town_info'. They aren't server-commands
   anymore, but are part of 'login' and 'transporter_drive' now.
   The format of the 'chat' server-command changed.

 * src/protocol.c, src/servercmds.c: Adapt to htsprotocol changes. 

Sat Dec 30 17:13:24 CET 2000 Uwe Hermann <uh1763@hermann-uwe.de>

 * README: Changed loaction of GLib 1.3.2 to ftp://ftp.gtk.org/pub/gtk/v1.3/.

 * configure, configure.in: Don't use "-g" if --disable-debug is given.

 * docs/PROTOCOL, src/protocol.c: The return codes of the commands 'addplayer'
   and 'login' changed.

 * docs/htsserver.6.in: Cosmetic changes.

 * src/servercmds.c: Fixed a bug in send_init_data(), which caused htsserver
   to send information about the wrong towns when sending the 'init'
   command.

 * src/towns.c: Prevent duplicate entries of towns in
   town_where_player_has_transporters().

Sun Dec 24 00:17:53 CET 2000 Uwe Hermann <uh1763@hermann-uwe.de>

 * AUTHORS, README, configure, configure.in, data/htsserver.lsm.in,
   docs/HACKING, docs/PROTOCOL, docs/htsserver.6.in, src/cmdline.h:
   Changed my email adress to uh1763@hermann-uwe.de.

 * configure, configure.in, data/Makefile.in: The lsm file is not versioned
   anymore now. It's just called htsserver.lsm.

 * configure.in: Renamed HTSSERVER_EXPAND_DIR to EXPAND_DIR to make it more
   generic.

 * data/Makefile.am, data/Makefile.in: Use ${top_srcdir} where appropriate.

 * src/protocol.c: Changed the login command to not expect an ID any longer,
   but rather the playername. Added code to h_transporter_drive(), which
   checks whether the transporter is already located in the destination town.

Thu Dec 14 18:31:49 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Update.

 * src/file.c, src/log.c, src/net.c, src/protocol.c:
   Use \"%s\" in printf()-like strings instead of '%s'.

 * src/net.c, src/servercmds.c:
   Do not comma-separate any arguments of network commands. Separate
   them with a single space and enclose all strings with double quotes. Numbers
   and digits needn't be enclosed by double quotes (but it won't hurt either).

Mon Dec 11 19:15:02 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in: Removed check for getpass() as we
   don't use this anymore.

 * src/misc.c, src/misc.h: Cosmetic changes.

 * src/protocol.c: Send a 'transporter_arrived' server command when a
   transporter arrives in a town where you have one or more transporters.
   Disabled the command 'reconfig', as it doesn't work correctly, yet.

 * src/servercmds.c, src/servercmds.h: Added send_transporter_arrived().

Fri Dec  8 18:11:04 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Update.

 * configure: Use autoconf 2.49b.

 * data/Makefile.am, data/Makefile.in: Create the directories where the
   configfile and the logfile is stored. Also create the savegames directory.

Thu Dec  7 18:47:53 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * holsham/Makefile.am, holsham/Makefile.in, holsham/goodnames.dat,
   holsham/townnames.dat: Removed files.

Thu Dec  7 18:33:06 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.am, Makefile.in: Moved the lsm-file and the configfile to data/.
   Moved the manpage to docs/.

 * README: Typo.

 * TODO: Small fix.

 * configure, configure.in:
   Create data/Makefile, data/htsserver-0.5.9.lsm, data/htsserver.conf
   and docs/htsserver.6. Removed creation of holsham/Makefile,
   htsserver-0.5.9.lsm and htsserver.6.

 * data/Makefile.am, data/Makefile.in, goodnames.dat, data/htsserver.lsm.in,
   data/townnames.dat: The new directory data contains the data files
   goodnames.dat townnames.dat and routines to install them. It also installs
   the configfile in the location given by the configure option --configfile.
   The lsm file is located in this directory now, too.
   The uninstall target removes the configfile, the logfile and the savegames.

 * data/htsserver.conf.in: The configfile htsserver.conf is created from this
   template file.

 * docs/Makefile.am, docs/Makefile.in, docs/htsserver.6.in: Install the manpage
   in the correct location.

 * src/file.c: Renamed file_mkdir_if_it_doesnt_exist() to file_mkdir(). This
   function now returns a gint.

Wed Dec  6 20:38:59 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.in, config.h.in, configure, configure.in, src/Makefile.in:
   Renamed RELEASEDATE to HTSSERVER_RELEASEDATE. Added configure options
   --with-configfile=FILE, --with-logfile=FILE, --with-datadir=DIR and
   --with-savegamesdir=DIR to make the game more relocatable.
   The default values for files and directories used by htsserver should be
   FHS compliant now.

 * README: Removed the Quickstart section as it is not needed anymore.

 * TODO: Removed three items.

 * htsserver.6.in: Document the new configure options and the default values
   for all commandline options. Removed description of --creategame and
   --gamename. 

 * htsserver.conf: Added item 'adminpassword' which has a default password.
   You should change this, of course! The 'logfile' item is given as the
   full path to the logfile.
   
 * htsserver.lsm.in: Use HTSSERVER_RELEASEDATE.

 * docs/FAQ: Removed file.

 * docs/HACKING: Removed 'Game Files' section.

 * docs/Makefile.am, docs/Makefile.in: Removed all references to docs/FAQ.

 * holsham/Makefile.am, holsham/Makefile.in: Install the data files
   in $(HTSSERVER_DATADIR).

 * src/cmdline.c, src/cmdline.h: Added code to handle --configfile, --logfile,
   --datadir and --savegamesdir. Removed --creategame and --gamename. Show
   a more verbosive error message if a file/directory is not valid.

 * src/common.h: Remove checks/#defines related to S_ISREG, as we use
   g_file_test() for this now.

 * src/conf.c, src/conf.h: Store/use the values from 'configfile', 'logfile',
   'datadir', 'savegamesdir' and 'adminpassword'. Removed 'gamename' entry.

 * src/connections.c: Use HTSSERVER_RELEASEDATE.

 * src/defaults.h: Removed DEFAULT_LOGFILE and DEFAULT_CONFIGFILE.
   Added DEFAULT_ADMINPASSWORD.

 * src/file.c, src/file.h: Removed MAX_LEN_GAMENAME,
   file_create_game_directories(), file_check_adminpasswd(),
   file_get_admin_password(), file_create_game() and file_game_exists().
   file_valid_name() now allows slashes in files/directories/paths.

 * src/goods.c, src/towns.c: Use conf.datadir.

 * src/htsserver.c: Removed obsolete checks. Moved call of good_read_names()
   to another position.

 * src/log.c: Use conf.logfile.

 * src/misc.c, src/protocol.c: Removed references to save_game() and
   load_game().

 * src/protocol.c: Use conf.adminpassword.

 * src/savegame.c, src/savegame.h: Removed save_to_file(), load_from_file(),
   save_game(), load_game(), save_current() and load_current().

Tue Nov 28 19:45:54 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cmdline.c: Added two g_free() calls. They are needed to first free the
   strings allocated by conf_init() before allocating new strings via
   g_strdup().

 * src/misc.c, src/misc.h: Assign stdin, stdout and stderr to /dev/null in
   daemonize(). Remove strchop() which has been replaced by tokenize().

 * src/net.c: Cosmetic changes.

 * src/protocol.c: Use g_strcasecmp() instead of strcasecmp().

Sun Nov 26 21:29:35 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * ChangeLog: Typo.

 * src/cmdline.c, src/conf.c: Use g_strdup() instead of g_strdup_printf()
   where-ever possible, as this is most probably faster.

 * src/misc.c, src/misc.h: Added tokenize(), which splits a string into several
   tokens and returns them in a GPtrArray. This uses GLib's g_ptr_array_* and
   g_scanner_*.

 * src/net.c: Remove MAX_LEN_BUFFER. Use the new protocol_parse_message()
   instead of parse_data(). Output an error if protocol_parse_message() fails.
   Fixed two typos. Added a g_strchomp() to net_send_to_client(), so that
   the newline on the end of the line isn't written to the logs.

 * src/protocol.c, src/protocol.h: Removed MAX_LEN_COMMAND and
   MAX_COMMAND_ARGUMENTS. All handler functions now expect a GPtrArray as
   second argument. Renamed cmd_t to command_t and moved it from
   src/protocol.h to src/protocol.c. Replaced parse_data() with
   protocol_parse_message(), which is written from scratch using tokenize()
   and g_ptr_array_*. 

Sun Nov 26 12:42:30 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Updates.

 * htsserver.conf: Changed format of entries. You need to use 'foo = bar'
   entries instead of 'foo bar'. C-Style comments /* */ are allowed now.

 * src/cmdline.c: Output an error, if you use --logdest with a wrong parameter.
   Removed calls to set_cmdline_flag().

 * src/conf.c, src/conf.h: Major rewrite. Now we use the GLib g_scanner_*
   functions. Removed init_conf(), set_cmdline_flag(), parse_cfile(),
   c_unsigned_short(), c_int(), c_unsigned_int() and c_pchar().
   Added conf_init(), conf_parse(), conf_parse_symbol().
   Added conf.configfile. logdest is a guint now.

 * src/defaults.h: Changed all #defines' names to start with DEFAULT_.

 * src/htsserver.c, src/misc.c, src/protocol.c: Use the new conf_init() and
   conf_parse().

 * src/net.c: Use conf.autosave_delay instead of AUTOSAVE_DELAY.

Thu Nov 23 18:57:00 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.6.in, htsserver.conf, src/cmdline.c, src/cmdline.h,
   src/defaults.h: Removed the --verbosity commandline option. The --logdest
   option now takes one of three possible arguments: 'file', 'syslog' or
   'none'. If you choose 'none', logging is turned off.

 * src/Makefile.am, src/Makefile.in, src/cfile.c, src/cfile.h, src/cmdline.c,
   conf.c, conf.h, src/file.c, src/htsserver.c, src/log.c, src/misc.c,
   src/net.c, src/protocol.c, src/savegame.c:  Renamed src/cfile.c to
   src/conf.c and src/cfile.h to src/conf.h.

 * src/log.c, src/log.h: Allow logging to syslog. Added log_to_syslog(). 

 * src/net.c: Added a g_strchomp() call in net_handle_client() to remove an
   unnecessary newline.

 * src/savegame.c: Use g_string_sprintfa() to simplify the code.

Mon Nov 20 22:01:26 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/goods.c: Improved and simplified good_read_names() using
   file_read_line().

 * src/htsserver.c: Check return code of good_read_names().

 * src/towns.c: Improved and simplified town_new_all() using file_read_line().

Sun Nov 19 17:48:53 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * README: Updated the 'Requirements' and the 'Compiling and Installing'
   section.

 * TODO, src/cfile.c, src/connections.c, src/file.c, src/goods.c,
   src/htsserver.c, src/misc.c, src/net.c, src/protocol.c, src/savegame.c,
   src/towns.c: We now use GLib's logging facilities g_message(), g_warning()
   and g_error(). Renamed lerror() to log_perror(). Removed htslog().

 * src/cmdline.c: Added LOG_TO_FILE and LOG_TO_SYSLOG.

 * src/file.c, src/file.h: Simplified file_get_admin_password(),
   file_create_game() and file_create_game_directories() a lot by using
   g_strdup_printf() and file_read_line(). Added file_write_line() and
   file_read_line().

 * src/htsserver.c: Call log_init(). 

 * src/log.c, src/log.h: Complete rewrite. Added log_init(), log_to_file() and
   log_perror(). We can now log everything to the logfile by using
   the Glib functions g_message(), g_warning() and g_error(). Removed htslog()
   and lerror().

 * src/net.c: Heavily simplified net_recv_from_client() and
   net_send_to_client() by using file_read_line().

 * src/protocol.c, docs/PROTOCOL: Check for file_get_admin_password()
   returning NULL. Send a 540 reply-code if NULL was returned.

Sun Nov 19 00:26:44 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in: htsserver now requires GLib 1.3.2.
   Removed AC_FUNC_VPRINTF as we use neither vprintf() nor _doprnt().

 * src/file.c: Rewrite of file_mkdir_if_it_doesnt_exist(). It uses
   g_file_test() now.

 * src/htsserver.c, src/misc.c, src/misc.h, src/towns.c:
   Removed randomize() and random_value(). We use g_random_int_range() now.

 * src/net.c: Typo.

 * src/players.c, src/protocol.c, src/towns.c, src/transporters.c: Fixed calls
   to g_snprintf() to prevent truncation of the strings.

Sun Nov 12 18:18:50 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.c, src/cfile.h, src/cmdline.c: 'verbosity' is a guint now.

 * src/common.h, src/file.c, src/net.c: Cosmetic changes.

 * src/net.c, src/net.h: net_handle_client() now returns FALSE again, if
   net_recv_from_client() fails. It doesn't have a fixed-size buffer anymore,
   too. Rewrite from scratch of net_recv_from_client(). It automatically
   allocates enough memory to be able to store all data up to the first
   newline, i.e. it reads exactly one line from the client. It also handles
   G_IO_ERROR_AGAIN, G_IO_ERROR_INVAL and G_IO_ERROR_UNKNOWN correctly now.
   Besides it only needs one argument now, which is the connection to read
   from. Use a g_strdup_printf() to simplify some code in net_send_to_client().

Sun Nov 12 01:10:56 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/PROTOCOL: Heavily updated to reflect all changes made in the last few
   weeks.

 * src/protocol.c: h_togglepause() now uses send_pause() and send_continue().

 * src/servercmds.c, src/servercmds.h: Added send_pause() and send_continue().

Sat Nov 11 17:19:54 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/file.c, src/file.h: Added file_game_exists().

 * src/htsserver.c: Check whether the game given on the commandline exists,
   and print an error if it doesn't.

 * src/players.c, src/players.h: Added player_remove().

 * src/protocol.c: Rewrite from scratch of delplayer. It takes the player-id
   of the player which shall be deleted and the player's password as arguments.
   If you are logged in as admin, the player is deleted regardless of whether
   the password is correct or not. The player who will be deleted must be
   logged out for 'delplayer' to work. The 'addplayer' command now returns the
   player-id which is assigned to the newly created player. Fixed bugs
   in h_buy_from_town_to_transporter() and h_sell_from_transporter_to_town().
   Misc. cosmetic changes.

 * src/servercmds.c, src/servercmds.h: Removed send_player_delete(), which is
   not used anymore.

Sat Nov 11 15:20:03 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Changed the priority of some items.

 * htsserver.6.in, htsserver.conf, src/cfile.c, src/cfile.h, src/cmdline.c,
   src/cmdline.h, src/defaults.h, src/htsserver.c, src/log.c, src/log.h,
   src/misc.c: Removed the commandline options --daemonize and --stderr-device.
   You cannot log to stderr anymore. htsserver always runs as daemon, now.

 * src/cmdline.c: Added some TODO items. Simplified the code for --verbosity
   quite a bit.

 * src/cmdline.h: Added a notice to the output of --help, which tells users
   where to report bugs.

 * src/log.c: htslog() doesn't limit the length of the message anymore.
   htslog() doesn't print the logging level (ERROR, INFO, DEBUG) anymore.
 
 * src/net.c: Added two missing g_free() calls in
   net_broadcast_to_connections() and net_broadcast_to_players().

Sat Nov 11 11:18:09 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cmdline.c: Improve the code which sets the port.

 * src/cmdline.c, src/goods.c, src/protocol.c, src/towns.c: Use
   is_number_or_digit() to check whether strtol() can succeed.

 * src/misc.c, src/misc.h: Added is_number_or_digit().

 * src/net.c: net_broadcast_to_connections() and net_broadcast_to_players()
   don't limit the length of the messages anymore.

 * src/protocol.c: h_passwd() now uses the player-ID instead of the playername.

Fri Nov 10 22:59:35 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in: Removed checks for fdopen(), fileno()
   and select() as we don't use those functions anymore.

 * src/protocol.c: Cosmetic changes. Rewrite of h_login(). It now takes the
   ID of the player as the first argument. Rewrite of h_chat(), which
   also uses the player ID instead of the playername, now. Fixed the text
   of some lerror() calls.

 * src/servercmds.c, src/servercmds.h: Added send_chat_message().

Fri Nov 10 18:45:51 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.conf, docs/FEATURES, docs/HACKING, docs/PROTOCOL: Fixed typos
   found by ispell.

 * src/connections.c, src/file.c, src/goods.c, src/htsserver.c, src/log.c,
   src/misc.c, src/protocol.c: Removed unnecessary #includes.

 * src/protocol.c: Moved the contents of chat() into h_chat. Changed the
   function and its prototype quite a bit, though. Moved identify_commands()
   into parse_data(). Cosmetic changes in most of the functions in
   src/protocol.c. Rewrite from scratch of h_transporter_drive().

Fri Nov 10 16:48:46 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cmdline.c, src/file.c, src/file.h, src/htsserver.c: Renamed
   valid_filename() to file_valid_name(), create_game() to file_create_game(),
   mkdir_if_not_exists() to file_mkdir_if_it_doesnt_exist(), checkadminpasswd()
   to file_check_adminpasswd() and create_gamedirs() to
   file_create_game_directories().

 * src/net.c, src/net.h, src/protocol.c, src/servercmds.c, src/servercmds.h:
   All server-commands functions now return void. The same is true
   for net_broadcast_to_connections() and net_broadcast_to_players().

Fri Nov 10 16:05:51 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/PROTOCOL, src/net.c: The reply-code 522 (login-timeout) has now been
   changed to a server-command called 'login_timeout'. Updated reply-codes of
   the command 'adminlogin'.

 * src/connections.c, src/net.c, src/protocol.c: Removed unnecessary htslog()
   calls.

 * src/connections.c: Fixed the text of several htslog() calls.

 * src/connections.c, src/net.c, src/servercmds.c: net_send_to_client() and
   net_recv_from_client() now return void.

 * src/file.c, src/file.h: Added file_get_admin_password().

 * src/misc.c: Changed the return values of the prototypes of
   signal_handler_exit() and signal_handler_config() to be RETSIGTYPE.

 * src/net.c, src/net.h: If any errors occure when sending or receiving data
   close the connection to the respective client. Log every message we send or
   receive. Changed a malloc() to g_malloc(). net_broadcast_to_connections()
   and net_broadcast_to_players() now don't fail anymore if there are no
   connections or players to send the messages to.

 * src/protocol.c: h_adminlogin() now gets the admin password from
   file_get_admin_password().

 * src/servercmds.c, src/servercmds.h: Added send_login_timeout().

 * src/transporters.h: Cosmetic changes.

Sun Nov  5 13:16:46 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.c: Removed debugging code. Replaced fprintf() with g_printerr().

 * src/htsserver.c, src/log.c: Replaced fprintf() with g_printerr().

Sat Nov  4 18:57:11 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * acconfig.h: Removed file.

 * ChangeLog: Typo.

 * Makefile.in: Removed references to acconfig.h.

 * configure.in, config.h.in, configure: Adapt AC_INIT to autoconf 2.49a.
   Use AC_CONFIG_SRCDIR. Instead of using acconfig.h, use AH_TOP, AH_VERBATIM
   and AH_BOTTOM. Use AC_LANG instead of AC_LANG_C. Only #define _GNU_SOURCE
   if it's not already #defined. Use the third argument of AC_DEFINE_UNQUOTED.

 * src/misc.c: The signal-handlers now return RETSIGTYPE instead of void.

Sat Nov  4 16:11:06 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/PROTOCOL: Reworded some parts. Removed unnecessary parts. Updates.

 * src/connections.c, src/net.c: Cast net_send_to_client() to (void), as we
   don't care about the return value most of the time.

 * src/protocol.c: Renamed the command 'drive' to 'transporter_drive'.
   All server-replies with reply code 533 now read "Player not found.".

 * src/servercmds.c: Typo.

Sat Nov  4 15:39:36 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/PROTOCOL, src/protocol.c: Removed the admin command 'kick'.

 * src/connections.c, src/connections.h: Added connection_all_except_this_one().

 * src/players.c, src/players.h: Added player_find_by_id().

 * src/protocol.c: Shortened the output of the 'help' command. Cosmetic
   changes. The admin command 'shutdown' now returns 200 if it succeeded, and
   sends the 'shutdown'-server command to all connected clients, except to
   the connection which initiated the shutdown.

 * src/servercmds.c, src/servercmds.h: Added send_shutdown(). 

Sat Nov  4 13:14:36 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * README: Moved some parts of docs/ARCHITECTURES into this file.

 * configure, configure.in: Removed references to docs/MANIFEST.in.

 * htsserver.6.in: Removed most stuff from the BUGS section.

 * docs/ARCHITECTURES, docs/BUGS, docs/MANIFEST.in: Removed files.

 * docs/Makefile.am, docs/Makefile.in: Removed references to docs/MANIFEST.in,
   docs/ARCHITECTURES and docs/BUGS.

 * src/protocol.c: Added some TODO items. Cosmetic changes. 

Sun Oct 29 14:57:04 CET 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cmdline.c: Removed unnecessary #includes. Use g_printerr() to
   print errors to stderr. Until now most errors were only written to the
   logfile. Cosmetic changes.

 * src/net.c: If we cannot create the server socket, exit the game.

Sat Oct 28 17:30:46 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Updates.

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/pcommands.inc:
   Removed src/pcommands.inc. The content of the file is in src/protocol.c now.

 * src/cfile.c, src/cmdline.c, src/file.c, src/htsserver.c, src/misc.c,
   src/net.c, src/savegame.c: Cosmetic changes.

 * src/net.c, src/net.h, src/protocol.c, src/servercmds.c: Renamed
   broadcast_to_connections() to net_broadcast_to_connections() and
   broadcast_to_players() to net_broadcast_to_players(). 

Sat Oct 28 16:57:09 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/HACKING: Rewrite of the coding guidelines.

 * docs/PROTOCOL, src/pcommands.inc, src/protocol.c: Removed the 'who' command. 

 * docs/PROTOCOL: Removed the item '4.3. List of Reply-Codes', as the
   information contained therein can be gathered from other parts of the
   document, too. Updated some entries. Added transporter_set_name. Other
   changes, which aren't tested or implemented properly, yet.

 * src/pcommands.inc: Use player_exists() instead of duplicating the
   functionality. Removed some reply-strings; they will be implemented as
   server-commands later on. 

Sat Oct 21 18:20:09 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/FEATURES: Updates.

 * docs/PROTOCOL, src/pcommands.inc, src/protocol.c: Removed the command
   'showallplayers', as the player information is now sent via the
   server-command 'init' and is updated everytime it changes(e.g. by
   send_player_logged_out() et al.).

 * src/cfile.c, src/cmdline.c, src/cmdline.h, src/htsserver.c: Check if
   htsserver has been started with '-g <gamename>'. If not, output a
   respective error message.

 * src/cmdline.c: Make use of g_strdup_printf(), which makes the code more
   compact.

 * src/net.c: Use net_recv_from_client() and don't duplicate its functionality
   unnecessarily.

 * src/pcommands.inc, src/protocol.c, src/transporters.c, src/transporters.h:
   Added new command 'transporter_set_name'.

Sat Oct 21 16:53:13 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.am, Makefile.in, TODO, htsserver.conf, docs/Makefile.am,
   docs/Makefile.in, holsham/Makefile.am, holsham/Makefile.in, src/Makefile.am,
   src/Makefile.in, src/cfile.c, src/cfile.h, src/cmdline.c, src/cmdline.h,
   src/common.h, src/connections.c, src/connections.h, src/defaults.h,
   src/file.c, src/file.h, src/goods.c, src/goods.h, src/htsserver.c,
   src/htsserver.h, src/log.c, src/log.h, src/misc.c, src/misc.h, src/net.c,
   src/net.h, src/pcommands.inc, src/players.c, src/players.h, src/protocol.c,
   src/protocol.h, src/savegame.c, src/savegame.h, src/servercmds.c,
   src/servercmds.h, src/towns.c, src/towns.h, src/trade.c, src/trade.h,
   src/transporters.c, src/transporters.h: Cosmetic changes.

 * README, TODO, docs/FEATURES: Several updates.

 * htsserver.conf: You can now turn off the login-timeout feature by
   setting the configfile variable 'login_timeout' to zero or by setting the
   LOGIN_TIMEOUT #define in src/defaults.h to zero.

 * src/cfile.c: Fixed some sort of bug, which has never produced any problems.

 * src/connections.c, src/connections.h, src/pcommands.inc: Renamed the
   gcoolean isadmin to is_admin.

 * src/file.c: Fixed a g_print() which had too many arguments.

 * src/net.c: You can now turn off the auto-save feature by setting the
   configfile variable 'autosave_delay' to zero or by setting the
   AUTOSAVE_DELAY #define in src/defaults.h to zero.

 * src/net.c, src/net.h, src/pcommands.inc: Renamed broadcast() to
   broadcast_to_connections(). It takes a list of connections as the first
   argument now.

 * src/pcommands.inc: Removed a warning about a cast.

 * src/players.c, src/players.h: Added the gboolean is_logged_in.

 * src/servercmds.c: The 'init' server-command now also send information about
   whether players are logged in or not. Unfinished and untested.

Mon Oct 16 22:36:05 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.conf, src/cfile.c, src/defaults.h: Removed the 'defaultgame'
   option. It was useless, as you need to specify a gamename on the
   command-line anyway.

 * src/cfile.c, src/cfile.h, src/cmdline.c, src/cmdline.h, src/common.h,
   src/connections.c, src/connections.h, src/defaults.h, src/file.c,
   src/file.h, rc/goods.c, rc/goods.h, src/htsserver.c, src/htsserver.h,
   src/log.c, src/log.h, src/misc.c, src/misc.h, src/net.c, src/net.h,
   src/pcommands.inc, src/players.c, src/players.h, src/protocol.c,
   src/protocol.h, src/savegame.c, src/savegame.h, src/servercmds.c,
   src/servercmds.h, src/towns.c, src/towns.h, src/trade.c, src/trade.h,
   src/transporters.h: Changed the layout of the GPL-header.

 * src/net.c: Send a 'player_logged_out' command when the server loses the
   connection to a client. 

 * src/pcommands.inc: Send a 'player_logged_out' command after a client
   logged out via the 'quit' command.

 * src/servercmds.c: The 'good_amount_update' and 'good_price_update' commands
   are now comma-separated, too.

 * src/transporters.h: Added the #define ON_THE_WAY.

Sun Oct 15 23:59:03 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/net.c, src/net.h, src/pcommands.inc, src/protocol.c, src/servercmds.c:
   Renamed broadcast2players() to broadcast_to_players().

 * src/servercmds.c: The 'init' server-command now also sends a list of all
   currently existing players. Fixed a small bug (a typo to be more precise)
   which prevented the goods and towns info to be sent.

 * src/transporters.c: Changed the layout of the GPL-header. This has to
   be done in all other files, too.

Sun Oct 15 22:14:48 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.h, src/connections.h, src/goods.h, src/players.h, src/protocol.h, 
   src/towns.h, src/transporters.h: Separated the struct definitions from
   the respective typedef.

 * src/connections.c: Removed a htslog().

 * src/net.c, src/net.h: Use connection_close() instead of duplicating the
   code of that function. broadcast() and broadcast2players() now return
   an int instead of void. The "Lost connection to <Foo>" log-messages now
   also log the playername.

 * src/pcommands.inc, src/players.h: Players now have an ID. This is logged
   when doing a h_addplayer().

 * src/pcommands.inc, src/servercmds.c, src/servercmds.h: Added
   send_player_new(), send_player_delete(), send_player_logged_in(),
   send_player_logged_out(), send_town_info() and send_good_price_update().

 * src/players.c, src/players.h: Added player_get_next_free_id(), which
   assigns an ID to a newly created player. Added player_all_except_this_one().

 * src/servercmds.c: The format of the 'init' server-command has changed a lot.
   Expect further changes soon.

 * src/towns.c: Added town_where_player_has_transporters(). 

Sun Oct  8 21:30:54 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/connections.c, src/net.c, src/net.h, src/pcommands.inc, src/protocol.c,
   src/servercmds.c: Renamed send_to_client() to net_send_to_client() and
   recv_from_client() to net_recv_from_client(). 

 * src/defaults.h, src/net.c: You can now turn off the 'login-timeout' feature
   by setting the tiemout to zero, e.g. in src/defaults.h. 

 * src/htsserver.c, src/misc.c, src/net.c, src/savegame.c, src/savegame.h:
   The autosave functionality and the 'login-timeout' feature are now both
   provided by the GLib mainloop.

Sat Oct  7 17:27:30 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.in, README, configure, configure.in: Updated to new htsserver
   version 0.5.9.

 * TODO, htsserver.lsm.in, docs/BUGS: Updates.

 * docs/FEATURES: Reworded two phrases.

 * docs/HACKING, docs/MANIFEST.in, src/Makefile.am, src/Makefile.in,
   src/cmdline.c, src/connections.c, src/net.c, src/sock.c, src/sock.h:
   Removed src/sock.c and src/sock.h. The functionality is in net.c now.

 * docs/PROTOCOL, src/protocol.c: Removed reply code 420. New htsprotocol
   version: 0.4.6.

 * src/connections.c, src/connections.h: Removed connection_perform_close().
   Removed 'stream' from connection_t and added 'GIOChannel *channel' and
   'guint event_source_id'. connection_accept() and connection_close() are
   rewritten from scratch and use GIOChannels, now. Removed
   connection_find_by_fd(), which is obsolete, and added
   connection_find_by_channel(). Removed connection_lost(). 

 * src/misc.c, src/misc.h, src/pcommands.inc: Removed exit_game. Now call
   g_main_quit() to leave the mainloop.

 * src/net.c, src/net.h: Now use the GLib mainloop functionality to handle
   all event sources, i.e. mostly the client sockets. net_main_loop(),
   recv_from_client() and send_to_client() are rewritten from
   scratch. Added net_create_socket(), which contains most of the stuff from
   the removed sock.c and sock.h. It additionally sets the socket nonblocking.
   Added net_handle_client(), which handles client requests and disconnects.
   Removed handle_input_from_client(). 

Thu Oct  5 19:55:18 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * NEWS: Updates.

 * htsserver.lsm.in: Fixed filesize of the htsserver-0.5.8.tar.gz

 * src/cmdline.c: Beautified the output of the --help option.

 * src/cmdline.c: Cosmetic changes.

 * src/file.c: Beatified and simplified the output after --creategame.

 * src/getopt.c, src/getopt.h, src/getopt1.c, docs/MANIFEST.in: Replaced the
   old getopt files with those from the current glibc 2.1.94.

 * src/htsserver.c: Removed the annoying message that no configfile has been
   found. I think an admin of a Holsham Traders game should be smart enough
   to figure out that he needs a configfile to change stuff :-)

 * Released as 0.5.8.

Thu Oct  5 16:26:18 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * configure, configure.in: Set release-date to October 5, 2000.

 * docs/PROTOCOL, src/pcommands.inc: Changed the reply for the logout command
   to '200 Logout sucessful.'.

 * src/cfile.h, src/log.c: Cosmetic changes.

Thu Oct  5 11:27:44 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.c, src/file.c, src/goods.c, src/log.c, src/net.c,
   src/pcommands.inc, src/towns.c: Fixed buffer sizes and the 2nd argument of
   fgets() calls, to prevent nasty bugs.

 * src/file.c: Added a missing '\n' to a string.

 * src/protocol.c: Cosmetic changes. 

Wed Oct  4 17:53:37 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * README, TODO: Updates.

 * htsserver.conf, docs/PROTOCOL, src/cfile.c, src/cfile.h, src/defaults.h,
   src/net.c, src/pcommands.inc: Removed config-options max_connections and
   max_players. Holsham Traders will feature unlimited number of players.

 * src/file.c: After the user has done a 'htsserver --creategame' he's now
   told that he can start the game with 'htsserver -g <gamename>'.

 * src/pcommands.inc: Do not send those 'Foo logged out.' messages to clients
   anymore.

 * src/protocol.c, src/savegame.c, src/trade.c: Cosmetic changes.

 * src/servercmds.c: Fixed the arguments of several g_string_sprintf() calls.
   Check two calls of send_to_client() whether they return -1.

 * src/servercmds.c, src/servercmds.h: send_good_amount_update() now returns
   a gint.

 * src/sock.c, src/sock.h: close_socket() now returns void.

Mon Oct  2 18:10:00 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * ChangeLog, NEWS, README, TODO, configure, configure.in, htsserver.6.in,
   htsserver.conf, htsserver.lsm.in, docs/ARCHITECTURES, docs/FAQ,
   docs/FEATURES, docs/HACKING, docs/MANIFEST.in, docs/Makefile.am,
   docs/Makefile.in, holsham/Makefile.am, holsham/Makefile.in, src/Makefile.am,
   src/Makefile.in, src/cfile.c, src/cmdline.c, src/file.c, src/file.h,
   src/htsserver.c, src/log.c, src/misc.c, src/misc.h, src/net.c, src/net.h,
   src/protocol.c, src/savegame.c, src/servercmds.h, src/sock.c, src/sock.h: 
   Small fixes, updates and cosmetic changes.

 * Makefile.am, Makefile.in: Removed the Makefile targets bz2dist, snapshot
   and bz2snapshot because they were never used.

 * config.h.in, configure, configure.in, src/common.h: Added checks for
   errno.h, signal.h, stdio.h and sys/types.h.

 * src/Makefile.am, src/Makefile.in: Removed the Makefile target lint.

 * src/connections.c, src/connections.h: Renamed perform_close() to
   connection_perform_close() for more consistency. Added connection_remove().
   Fixed possible memory-leak in connection_accept().

 * src/goods.c: Slighly improved good_read_names().

 * src/pcommands.inc, src/players.c, src/transporters.c, src/transporters.h:
   The location variable of transporter_t is now a guint.

 * src/players.c: player_has_valid_name() now only allows playernames to
   contain letters and spaces.

 * src/players.h, src/towns.h, src/transporters.h: Array-sizes are big
   enough now... 

 * src/servercmds.c: Fixed a g_string_sprintfa()-call.

 * src/towns.c, src/towns.h: Slightly improved town_new_all().
   Added town_add().

 * src/towns.h: Added the #define HOME_TOWN. MAX_LEN_TOWNNAME is set to 15 now.

 * src/trade.c: Removed some unnecessary checks for functions returning NULL.

 * src/transporters.c: transporter_at_beginning_of_game() now gives each player
   two transporters in the beginning of the game, a smaller and a bigger one.

Sun Sep 24 18:57:54 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/net.c, src/net.h, src/pcommands.inc, src/protocol.c:
   broadcast2players() now takes a GList as the first argument, which is a
   list of players who should receive a message.

 * src/pcommands.inc, src/servercmds.c, src/servercmds.h: Activated and
   improved the code which sends an update-message to every player who has a
   transporter in a town where the amount of a good changed.

 * src/players.c, src/players.h: Added player_with_transporters_in_same_town().

Sat Sep 23 13:39:29 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/conn.c, src/conn.h,
   src/connections.c, src/connections.h, src/net.c, src/net.h, src/protocol.c,
   src/protocol.h, src/servercmds.c, src/servercmds.h: Renamed src/conn.c and
   src/conn.h to src/connections.c and src/connections.h.

 * src/common.h: Fixed wrong indentation.

 * src/pcommands.inc, src/servercmds.c, src/servercmds.h, src/trade.c:
   Added send_good_amount_update(). This code sends updates (to all players
   who need this information), whenever the amount of a good in a town changes.
   This code is not yet activated, as it's not working properly, yet.

Mon Sep 18 18:34:53 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/conn.c, src/conn.h: The GList 'connections' is explicitely set to NULL.
   Minor fixes.

 * src/goods.h, src/trade.h: Removed unnecessary includes.

 * src/trade.c: Cosmetic changes.

Sun Sep 17 22:16:07 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * ChangeLog, configure, configure.in, htsserver.lsm.in : Changed all 'GLIB'
   and 'glib' strings to read 'GLib'.

 * NEWS, TODO: Updates.

 * src/goods.c, src/goods.h, src/htsserver.c: Renamed read_goodnames() to
   good_read_names(). Minor fixes.

 * src/htsserver.c, src/towns.c, src/towns.h: Renamed town_add_good_all() to
   town_add_goods_at_beginning_of_game().

 * src/pcommands.inc, src/players.c, src/players.h: player_has_valid_password()
   now takes a player_t as first argument, not a string. Cosmetic changes.

 * src/players.c: The GList 'players' is explicitely set to NULL. Minor fixes.

 * src/towns.c, src/towns.h: The GList 'towns' is explicitely set to NULL.
   Removed the 'GList *goods' argument from town_new(). Always create all
   goods in good_new(). Other minor changes.

 * src/transporters.c, src/transporters.h: Removed the 'GList *goods' argument
   from transporter_new(). Small fix in transporter_drive(). 

Sun Sep 17 20:03:14 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.in, config.h.in, configure, configure.in, docs/Makefile.in,
   holsham/Makefile.in, src/Makefile.in: Added AC_PROG_CPP. Added
   checks for memory.h, string.h and strings.h. Now use AC_HELP_STRING for
   outputting help-strings.

 * src/common.h: Only conditionally include most of the system-headers.
   Properly indented the lines. Added check for broken S_ISREG implementation.

Sun Sep 17 19:05:48 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in: Switched to autoconf 2.49a.

 * configure.in: Added AC_COPYRIGHT() and AC_PROG_CC_STDC.

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in: Added src/common.h and
   removed src/data.h and src/portable.h.

 * src/cfile.c, src/cfile.h, src/cmdline.c, src/cmdline.h, src/conn.c,
   src/conn.h, src/defaults.h, src/file.c, src/file.h, src/goods.c,
   src/goods.h, src/htsserver.c, src/htsserver.h, src/log.c, src/log.h,
   src/misc.c, src/misc.h, src/net.c, src/net.h, src/players.c, src/players.h,
   src/protocol.c, src/protocol.h, src/savegame.c, src/savegame.h,
   src/servercmds.c, src/servercmds.h, src/sock.c, src/sock.h, src/towns.c,
   src/towns.h, src/trade.c, src/trade.h, src/transporters.c,
   src/transporters.h: Removed system-includes and added '#include "common.h"'.
   Removed includes of data.h and portable.h.

 * src/common.h: Added file. Contains system includes and common #defines.

 * src/data.h, src/portable.h: Removed files.

Sun Sep 17 17:07:35 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/MANIFEST.in: Cosmetic changes.

 * src/servercmds.c: Added to 'TODO' comment.

 * src/towns.c, src/trade.c, src/transporters.c: The GList with the goods in
   a town/transporter now contains all goods. Only about 1/4th of all goods
   are available in each town.

 * src/transporters.c: Your home-town is now Holsham.

 * src/transporters.h: MAX_LEN_TRANSPORTERNAME is now set to 15.

Sun Aug 20 18:03:59 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.am, Makefile.in: Fixed a small problem.

 * TODO, configure, configure.in, docs/FEATURES: Minor changes.

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/protocol.c,
   src/trade.c, src/trade.h: Added trade.c and trade.h.

 * src/goods.c, src/goods.h, src/pcommands.inc: Moved
   buy_from_town_to_transporter() and sell_from_transporter_to_town() to
   trade.c and trade.h. Renamed these functions to
   trade_buy_from_town_to_transporter() and
   trade_sell_from_transporter_to_town(). Removed the 'town_t *town' argument,
   as this can be figured out in the functions.

 * src/goods.h: MAX_LEN_GOODNAME is now set to 15.

 * src/transporters.c, src/transporters.h: Added transporter_free_all().

Tue Aug 15 04:23:38 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.6.in, src/conn.c, src/goods.c, src/htsserver.c, src/misc.h,
   src/net.c, src/net.h, src/pcommands.inc, src/players.c, src/players.h,
   src/protocol.c, src/servercmds.c, src/servercmds.h: Minor changes.

 * docs/PROTOCOL, src/protocol.c: Removed the networking commands 'nop' and
   'whoami'. They were only there for testing purposes anyway.

 * src/cfile.c, src/cfile.h, src/cmdline.c, src/cmdline.h, src/log.c,
   src/log.h, src/pcommands.inc, src/protocol.c, src/protocol.h: Changed int
   to gint, char to gchar etc.

Mon Aug 14 20:30:08 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.conf, src/cfile.c, src/cfile.h: Renamed configuration option
   'max_conns' to 'max_connections'.

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/conn.c, src/list.c,
   src/list.h, src/net.c, src/net.c, src/pcommands.inc, src/savegame.c: Removed
   list.c and list.h. All linked lists now use the GLib linked lists
   facilities.

 * docs/PROTOCOL, src/towns.c, src/transporters.c: Minor changes.

 * src/conn.c, src/conn.h, src/net.c, src/net.h, src/pcommands.inc,
   src/players.c, src/players.h, src/protocol.c, src/protocol.h,
   src/servercmds.c, src/servercmds.h: Added connection_new(),
   connection_free() and connection_add(). Renamed accept_conn() to
   connection_accept(), close_conn() to connection_close(), find_conn_by_fd()
   to connection_find_by_fd(), find_conn_by_player() to
   connection_find_by_player(), find_conn_by_playername() to
   connection_find_by_playername() and lost_conn() to connection_lost().
   Renamed connt_t to connection_t. This all should make the connection code
   clearer and more consistent.

Mon Aug 14 14:31:36 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO, src/conn.c, src/conn.h, src/protocol.h, docs/PROTOCOL: Updates and
   smaller changes.

 * src/conn.c, src/conn.h, src/net.c, src/pcommands.inc, src/players.c,
   src/players.h, src/savegame.c: 'players' is now a GList. All functions
   which use 'players' have been changed.

 * src/players.c, src/players.h: Added player_add() and player_free_all().

Sun Aug 13 16:59:13 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * README, configure, configure.in, htsserver.lsm.in, NEWS: Minor changes.

 * docs/PROTOCOL: Added info about the commands 'drive',
   'buy_from_town_to_transporter' and 'sell_from_transporter_to_town'.

 * src/cfile.c, src/servercmds.c: Fixed arguments of sscanf or similar
   functions to use "%u" instead of "%ud" (which is wrong) or "%d" (which is
   signed) for 'unsigned int' values.

 * src/goods.c, src/goods.h: Removed calculate_price() as it didn't do
   anything. Fixed a buffer overflow in read_goodnames(). Added
   good_find_by_id(), buy_from_town_to_transporter() and
   sell_from_transporter_to_town(). Other minor fixes.

 * src/net.c: Removed some compiler-warnings.

 * src/pcommands.inc, src/protocol.c: Fixed return-codes in h_drive(). Added
   h_buy_from_town_to_transporter() and h_sell_from_transporter_to_town().

 * src/towns.c, src/towns.h: Minor fixes in town_new_all(). Fixed
   town_add_good_all() so it doesn't generate multiple entries of the same
   good.

 * src/transporters.c, src/transporters.h: Added transporter_add_good() and
   transporter_free_capacity().

Sun Aug  6 18:31:27 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/PROTOCOL, src/servercmds.c: Heavily updated send_init_data(). It now
   sends information about age,money,transporters,goods and towns.

 * src/goods.c, src/goods.h: good_new() now also takes 'guint id' as argument.

 * src/htsserver.c: Now check whether town_new_all() returns -1 or not.

 * src/misc.c, src/misc.h: Small changes to random_value().

 * src/towns.c, src/towns.h: Several improvements of town_new_all(). It now
   reads the townnames from the respective data-file, the number of
   inhabitants and the amount of money a town owns is randomly generated,
   aswell as the number of goods and the type of the goods.

Sun Aug  6 13:18:28 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/htsserver.c, src/servercmds.c: Minor changes.

 * src/misc.c, src/misc.h: Added randomize() and random_value().

 * src/towns.c, src/towns.h: Added town_add_good_all().

Sat Aug  5 17:45:59 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/pcommands.inc, src/protocol.c: Improved h_drive().

 * src/towns.c, src/towns.h: Added a field 'id' to town_t and the respective
   functions. Added town_find_by_id(). Bugfixed town_free_all().

 * src/transporters.c: Bugfixed transporter_find_by_id().

Sat Aug  5 12:00:57 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Minor changes.

 * src/pcommands.inc, src/players.c, src/transporters.c, src/transporters.h:
   The transporters a player has got in the beginning of the game are now
   generated by transporter_at_beginning_of_game().

 * src/transporters.c, src/transporters.h: Added
   transporter_get_next_free_id(). transporter_new() now also takes the id of
   the transporter as an argument.

Fri Aug  4 21:13:18 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * docs/FEATURES, NEWS: Minor changes.

 * src/cmdline.c, src/cmdline.h, src/misc.c, src/misc.h, src/net.c, src/net.h:
   Changed int to gint, char to gchar etc.

 * src/goods.c, src/goods.h: calculate_price() is empty now. Slightly changed
   good_new() and good_t.

 * src/htsserver.c: Now calls town_new_all() and town_free_all().

 * src/pcommands.inc, src/protocol.c: Added h_drive().

 * src/players.c, src/players.h: player_new() now temporarily gives the player
   a transporter.

 * src/towns.c, src/towns.h: Added a list of all towns and the functions
   town_new_all(), town_free_all() and town_add_good().

 * src/transporters.c, src/transporters.h: Added transporter_find_by_id() and
   hopefully finished writing transporter_drive().
 
Sun Jul 30 20:47:20 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS, NEWS, README, TODO, docs/BUGS, docs/FAQ, docs/FEATURES,
   docs/HACKING, docs/MANIFEST.in, src/Makefile.am, src/Makefile.in,
   src/file.c: Minor fixes.

 * NEWS: Updates.

 * src/file.c, src/file.h: Changed int to gint, char to gchar etc.

 * src/goods.c: Added (not yet working) good_new() and good_free().

 * src/goods.h: Removed the trader_t and town_t stuff.

 * src/towns.c, src/towns.h: Added files. These contain town_t, town_new()
   and town_free().

Sun Jul 30 19:01:36 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.c, src/file.c, src/file.h, src/log.c, src/pcommands.inc,
   src/savegame.c: Removed htsfile() and texpand(). The functionality is now
   mostly provided by g_get_home_dir().

 * src/file.c, src/pcommands.inc: Use g_strchomp for cutting off newlines.

 * src/goods.c, src/goods.h, src/players.c, src/players.h, src/savegame.c,
   src/savegame.c, src/savegame.h, src/servercmds.c, src/servercmds.h,
   src/sock.c, src/sock.h, src/transporters.c, src/transporters.h: Changed
   int to gint, char to gchar, long to glong etc.

 * src/pcommands.inc, src/players.c, src/players.h: Renamed valid_playername()
   to player_has_valid_name(), valid_password() to player_has_valid_password().

 * src/players.c: Added player_add_transporter() and
   player_remove_transporter().

 * src/savegame.h: Cosmetic changes.

Sun Jul 30 14:29:48 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * TODO: Update.

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/conn.c, src/conn.h,
   src/net.c, src/protocol.c, src/protocol.h, src/savegame.c: Renamed
   player.[ch] to players.[ch] to be more consistent.

 * src/pcommands.inc, src/players.c, src/players.h: Renamed findplayer() to
   player_find(). Now uses player_new(). Renamed MAX_LEN_PASSWORD to
   MAX_LEN_PLAYERPASSWORD. Renamed player_t item 'passwd' to 'password'.

 * src/players.c, src/players.h: Added player_new() and player_free().

 * src/players.h: Added transporters and warehouses to player_t. Other minor
   changes.

 * transporters.c, src/transporters.h: Added files. They provide transporter_t,
   transporter_new(), transporter_free() and transporter_drive().

Sat Jul 29 14:56:17 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * NEWS, docs/MANIFEST.in, docs/Makefile.am, docs/Makefile.in, docs/PROTOCOL,
   src/conn.c, src/file.c, src/list.h, src/misc.c, src/net.c,
   src/pcommands.inc, src/protocol.c: Minor fixes.

 * README: Several documentation updates.

 * TODO: Lots of updates and especially a shift of priorities.

 * docs/FEATURES: Added some stuff from docs/README.specifications. Several
   other cleanups and additions.

 * docs/HACKING: Moved docs/README.programmers to docs/HACKING and slightly
   updated the file. Added a few things from docs/README.files.

 * docs/README.files, docs/README.programmers, docs/README.specifications:
   Removed files.

 * src/cmdline.c, src/file.c: Replaced printf() with g_print().

 * src/cmdline.c: Simplified the output of 'htsserver --help'.

 * src/log.c: Use g_strchomp to remove trailing newlines.

 * src/servercmds.c: Reimplemented send_init_data(). Now uses lots of
   GLib-functions and data-types.

Fri Jul 28 17:08:06 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in, src/portable.h: Removed checks for
   snprintf(), vsnprintf(), __snprintf(), __vsnprintf() and strerror(). GLib
   provides equivalents for all those functions.

 * ChangeLog, NEWS, README, ocs/README.programmers: Changed all references to
   'glib' to read 'GLib'.

 * TODO: Updates.

 * src/cfile.c, src/cmdline.c, src/conn.c, src/file.c, src/list.c, src/log.c,
   src/misc.c, src/pcommands.inc, src/protocol.c, src/savegame.c,
   src/servercmds.c: Replaced malloc() with g_malloc(), free() with g_free()
   and calloc() with g_malloc0(). These functions are more secure and
   more convenient.

 * src/file.c, src/log.c, src/net.c, src/protocol.c, src/servercmds.c: Replaced
   snprintf()/vsnprintf() with g_snprintf() and g_vsnprintf().

 * src/log.c: Replaced strerror() with g_strerror().

 * src/misc.c: The logging-message which is printed when a signal is caught
   now also prints the name of the signal in addition to the signal-number.

Fri Jul 28 13:25:33 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * config.h.in, configure, configure.in: Removed checks for strcasecmp() and
   strncasecmp(). Both have a GLib-equivalent.

 * src/Makefile.am, src/Makefile.in: Cosmetic changes.

 * src/cmdline.c, src/protocol.c: Replaced strncasecmp() with g_strncasecmp().

 * src/conn.c, src/net.c, src/pcommands.inc, src/sock.c: Replaced ntohs(),
   htons() and htonl() with g_ntohs(), g_htons() and g_htonl().

 * src/file.c: Rewrite of create_gamedirs(). We now use g_get_home_dir() to
   figure out the home-directory of the user. Besides we use GStrings instead
   of 'normal' pointers to char. This eliminates buffer-overflow risks.

Thu Jul 27 21:34:45 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, htsserver.conf:
   Cosmetic changes.

 * AUTHORS, THANKS: Merged THANKS into AUTHORS.

 * THANKS: Removed file.

 * README, docs/README.programmers, TODO, NEWS: Updates.

 * aclocal.m4, configure, docs/Makefile.in, holsham/Makefile.in,
   src/Makefile.in: Make use of GLib.

 * config.h.in, configure.in, src/cmdline.c: Always use our own copy of
   getopt.[ch]. Don't try to #include <getopt.h>.

 * configure.in: Removed AM_MAINTAINER_MODE and the check for 'date'.
   Added check for GLib. Only add several compiler-options, if we use gcc.

 * docs/MANIFEST.in: Removed entry of THANKS.

 * src/Makefile.am, src/cfile.c, src/cfile.h, src/conn.c, src/conn.h,
   src/data.h, src/file.c, src/file.h, src/misc.c, src/misc.h, src/player.c,
   src/player.h: Replaced the boolean type 'bool' with 'gboolean', which
   is #defined by GLib.

 * src/goods.h: Removed #defines for MIN() and MAX(). They are already provided
   by GLib.

Sat Apr 15 15:49:48 CEST 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS, htsserver.6.in: Added Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>

 * Makefile.in, NEWS, configure, configure.in: Updates.

 * configure, configure.in: Added a few CFLAGS to allow compilation on HP/UX

 * htsserver.lsm.in, src/cmdline.c: Minor fixes

 * src/portable.h: If neither vsnprintf() nor __vsnprintf() is found, use
   vsprintf() instead

 * src/protocol.c: Added missing prototype

Mon Mar 20 12:58:09 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * htsserver.lsm.in: Ooops. Forgot to update the lsm-entry

Mon Mar 20 12:39:38 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.in, aclocal.m4, configure, configure.in, docs/Makefile.in,
   holsham/Makefile.in, src/Makefile.in, src/cmdline.c: Added
   AM_MAINTAINER_MODE. Prepared for release

 * README, THANKS, htsserver.conf, docs/MANIFEST.in: Minor updates

 * Released as 0.5.7

Sun Mar 19 15:09:26 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS: Update

 * holsham/Makefile.am, holsham/Makefile.in, holsham/townnames.dat: Added
   townnames.dat which containes a list of all townnames

 * src/cmdline.c: Added validity checks for the arguments of --gamename and
   --logfile

 * src/file.c, src/file.h: Added valid_filename(), a function which checks
   whether a string only containes characters, numbers, dots and underscores

 * src/goods.c: Added three validity checks to buy()

Fri Mar 17 02:04:05 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * NEWS, README, TODO, htsserver.lsm.in: Updates

 * docs/PROTOCOL: Added server-commands info about 'init', 'chat', 'pause',
   'continue', '521' and '522'

 * src/net.c: Added two server-replies

 * src/pcommands.inc: Added server-replies and implemented the server-commands
   'pause' and 'continue'

 * src/portable.h: Removed unnecessary code

 * src/protocol.c: Added the 'chat' server-command

 * src/sock.c, src/sock.h: Changed most functions to return an int instead of
   void, so they can indicate errors by returning -1. htsserver doesn't quit
   anymore on a socket-error. Cosmetic changes

Tue Mar 14 20:53:45 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS, ChangeLog, NEWS, README, THANKS, TODO, docs/ARCHITECTURES,
   docs/BUGS, docs/FAQ, docs/FEATURES, docs/PROTOCOL, docs/README.files
   docs/README.programmers, docs/README.specifications: Cosmetic changes

 * configure, configure.in: Update to make htsserver ready for a release

 * docs/PROTOCOL: Added info that playernames and passwords cannot contain
   commas. Removed Type-of-reply code '0'

 * docs/README.programmers: Added indentation and brace-style info

Fri Feb 25 18:47:23 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * AUTHORS, README, docs/PROTOCOL: Cosmetic changes

 * src/goods.h: Changed MAX_LEN_TOWNNAME to 20

 * TODO: update

 * docs/PROTOCOL, src/pcommands.inc, src/protocol.c: Added most of the missing
   server-replies

 * src/pcommands.inc: Cosmetic changes. If there are no players, dont send
   "No players logged in." as result of 'who' and 'showallplayers', but send
   and empty string. h_save()/h_load() now check whether
   save_game()/load_game() failed or not, and send a respective reply to the
   client. Fixed a bug concerning the login-timeout in h_delplayer() 

 * THANKS, docs/ARCHITECTURES: added Sparc Station 2 as a new architecture
   htsserver is known to work on

Sat Feb 19 22:56:25 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.h, src/cmdline.h, src/conn.h, src/data.h, src/defaults.h,
   src/file.h, src/goods.h, src/htsserver.h, src/list.h, src/log.h, src/misc.h,
   src/player.h, src/portable.h, src/protocol.h, src/savegame.h,
   src/servercmds.h: #Included config.h in each of these files

 * src/defaults.h, src/goods.h: moved MAX_NUMBER_OF_GOODS and
   MAX_NUMBER_OF_TOWNS to goods.h, as these values will not be changed by
   the user but read from a data-file

 * src/file.c: Fixed a possible segmentation violation

 * src/log.c: Increased log-message buffer

 * src/servercmds.c: Added the number of goods to the init-string

Fri Feb 18 01:25:14 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * docs/ARCHITECTURES: Added new architectures

 * src/file.h, src/sock.h: Minor fixes

 * src/net.c: Added a delay after sending data to a client. This was necessary
   to make nhtsclient work properly. Maybe fix this later

 * src/pcommands.inc, src/player.c, src/player.h: renamed MAX_LEN_PASSWD
   to MAX_LEN_PASSWORD

 * src/servercmds.c: Fixed the calculation of the length of the data sent

Mon Feb 14 00:41:47 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * docs/MANIFEST.in, src/Makefile.am, src/Makefile.in, src/pcommands.inc,
   src/servercmds.c, src/servercmds.h: Added the server-command 'init', which
   sends some data to a client each time the client logs in

 * src/goods.c, src/goods.h: Added some 'extern's and fixed read_goodnames()

 * holsham/goodnames.dat: Added some more good-names

 * src/protocol.c: Updated the protocol-version string to 0.4.4

Sat Feb 12 22:46:00 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * Makefile.am, Makefile.in, acconfig.h, config.h.in, configure, configure.in,
   docs/MANIFEST.in, holsham/, holsham/Makefile.am, holsham/Makefile.in,
   holsham/goodnames.dat: Added a data-file containing all goodnames. This
   will be installed in /usr/local/share/games/htsserver/holsham

 * docs/PROTOCOL, src/pcommands.inc: Added some 531 and 200 reply-codes.
   Updated list of reply-codes each command can generate

 * src/goods.c, src/goods.h, src/htsserver.c: Added read_goodnames(), which
   reads all goodnames from a data-file. Not yet finished

Fri Feb 11 22:37:49 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * configure, configure.in, src/player.c: cosmetic changes

 * docs/PROTOCOL: Added info about all possible replies a command can generate
   as far as they are implemented, yet

 * src/net.c, src/pcommands.inc, docs/PROTOCOL: Added a few more reply-codes

 * acconfig.h, config.h.in, configure, configure.in, src/portable.h: Added a
   check for socklen_t

Fri Feb 11 01:57:55 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * configure, configure.in, src/Makefile.am, src/Makefile.in, TODO: Added
   the configure option --enable-debug

Fri Feb 11 00:10:58 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * docs/ARCHITECTURES: added another architecture

 * docs/README.specifications: Added a note that the document is outdated

 * README: Added information about the new htsserver-cvs mailing-list

 * configure.in, config.h.in, configure: Added checks for __snprintf()
   and __vsnprintf()

 * src/portable.h: Fixed some #defines. htsserver now compiles
   on SunOS again

 * docs/PROTOCOL: Major update. Added server-replies

 * src/file.c: if snprintf() is not found, use sprintf()

Mon Feb  7 16:59:32 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * README, src/net.c: cosmetic changes

 * src/sock.c: Changed the last argument of socket() from 0 to IPPROTO_TCP

Sun Feb  6 16:23:34 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * docs/ARCHITECTURES, THANKS: htsserver successfully compiled on FreeBSD 3.4
   with gcc 2.7.2.3

 * configure.in, Makefile.in, config.h.in, configure: Added checks for pwd.h
   and getpass(). Changed version information to 0.5.7

 * NEWS: Updates for 0.5.7

 * README: Updates for 0.5.7. Added a QUICKSTART section

 * htsserver.6.in, cmdline.c: Added information about --creategame

Sat Feb  5 19:07:54 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * src/net.c, src/pcommands.inc, src/protocol.c: Added some server-replies

 * docs/PROTOCOL: Added info about server-replies, and a list of all
   currently available replies

Sat Feb  5 17:07:20 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * src/cfile.c, src/cfile.h: Added set_cmdline_flag(), which sets a flag,
   which indicates that a certain option was set on the cmdline

 * src/cfile.c, src/cfile.h, src/cmdline.c, src/file.c, src/file.h,
   src/htsserver.c, src/log.c, src/pcommands.inc, src/savegame.c:
   Added the command-line option --creategame, which creates all necessary
   files and directories of a new game. Doesn't work properly yet

 * ChangeLog: Fixed some inconsistencies in previous ChangeLog entries

 * src/cfile.c, src/cfile.h: Added save_conf() and restore_conf() prototypes

 * src/cfile.c, src/cmdline.c, src/misc.c: When doing a 'reconfig', the
   commandline options were overwritten. This should be fixed now

 * src/htsserver.c: Re-organized the order of the function-calls. Changed
   'port' to 'PORT' in the logfile-entry, which is generated when htsserver
   is started

Thu Feb  3 21:22:31 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * NEWS: updates
 
 * src/savegame.c, scr/defaults.h: cosmetic changes

 * htsserver.conf: Added 'login_timeout' option. Smaller fixes

 * src/cfile.c, src/cfile.h, src/net.c: added the config-file option
   login_timeout

 * src/pcommands.inc: If you issue the command 'adminlogout', your
   login-timeout counter is resetted to zero, so that you aren't disconnected
   at once because htsserver thinks your login-timeout expired

 * released as htsserver 0.5.6

Thu Feb  3 17:10:50 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * configure.in: added the GPL-header. Misc. fixes

 * ChangeLog: switched to this new ChangeLog-format

 * htsserver.conf: major rewrite

 * README, NEWS, THANKS, TODO, htsserver.lsm.in, docs/FAQ, docs/FEATURES,
   docs/PROTOCOL, docs/README.programmers: updates

 * src/Makefile.am: cosmetic changes

Thu Jan 22 22:10:43 CET 2000  Uwe Hermann <uh1763@bingo-ev.de>

 * src/misc.c, src/misc.h: renamed 'int exitflag' to 'bool exit_game'

 * src/protocol.c, src/pcommands.inc: added h_togglepause(). This allows the
   admin to block off every input from all clients, except for those with
   admin-permissions

 * src/misc.c: added a signal-handler for SIGABRT. SIGPIPE is now ignored

 * src/data.h: added some ifndef's

 * src/portable.h: added some more checks

 * src/net.c: fixed a really ugly bug in recv_from_client(), which could
   cause 100MB log-files and more

v0.5.5 January 6, 2000
----------------------
 -moved findplayer(), player_exists() and valid_password() to player.[ch]
 -casted the result of each *printf() to void.
 -added a "\n" to each fprintf where it was missing.
 -changed a sprintf() to snprintf() in file.c and a strcasecmp() to
  strncasecmp() in protocol.c
 -added mkdir_if_not_exists(), which makes create_gamedirs() a lot simpler
 -new command: passwd.
 -misc. cosmetic changes and simplified some code
 -updated docs/PROTOCOL
 -added some 'const' where apropriate 
 -removed find_conn_slot().
 -connections are now stored in a linked list
 -removed 'location' from player_t
 -send_to_client() now returns an int (-1 on error, 0 on success)
 -usage of broadcast2players() makes chat() simpler.
 -moved logged_in() and logged_in_as_admin() to conn.c
 -moved recv_from_client(), send_to_client(), broadcast() and
  broadcast2players() to net.c
 -improved h_delplayer(). This can be used by a player and by the admin.
  If you have admin-permissions you can delete *any* player, as player
  you can only delete your own 'player'. 'retire' is now obsolete.
 -removed 'retire'
 -parse_cfile() now returns an int. Calls to parse_cfile() check for -1,
  and write an error-message to the log-file, if (re-)reading the
  config-file failed.
 -'addplayer' now ensures that a playername only contains letters and digits
 -switched to autoconf 2.13 and automake 1.4
 -htsserver now logs on which port it was started
 -made inclusion of time.h and/or sys/time.h more portable
 -added config-option max_players and a check for it in h_addplayer()
 -tiny man-page update: now it shows the release-date of the package
 -the 'exit'-signal-handler now uses 'exitflag'
 -fixed check for max_conns
 -fixed portable.h: up to now, htsserver *always* used vsprintf(), even
  if vsnprintf() was available.
 -Up to now, after 'kick'ing yourself, htsserver segfaultet. FIXED.
 -updated docs/FAQ and other documentation
 -bugfixed h_addplayer
 -added admin-command 'showallplayers'
 -fixed valid_playername() to allow spaces in playernames
 -changed all Copyright-lines to say (C) 1998-2000 instead of (C) 1998,1999
 -h_who() and h_showallplayers() now log which admin executed the commands
 -changed configure.in so it checks for autoconf >= 2.13
 -added macros MIN and MAX to goods.h
 -added check_connection_times(), which checks if a connection was connected
  longer than LOGIN_TIMEOUT without having logged in. If yes, that connection
  is kicked. This check is not performed, if you have admin-permissions.
 -casted result of each dit_init() to void.
 -updated NEWS and README
 -moved LOGIN_TIMEOUT to src/defaults.h, because users might want to
  change this timeout
 -added a welcome-message, which is displayed everytime you connect.
 -savegames are now explicitly chmod()ed to 0600.
 -updated TODO, NEWS, docs/FAQ, docs/FEATURES, docs/PROTOCOL,
  docs/README.programmers

v0.5.4 December 20, 1999
------------------------
 -Fixed a small but severe bug: you could shutdown the server with 'shutdown'
  without being logged in as admin, and the admin could *not* shutdown the
  server.
 -updates: AUTHORS, THANKS, docs/README.programmers
 -removed all casts of the result of malloc() and calloc(). These are not
  necessary and can hide errors.
 -wrote a more descriptive info-line than "header of foo.c" in each src/*.h
 -savegames are now stored in ~/.htsserver/<gamename>/save/, as specified in
  docs/README.files.
 -adjusted some error-messages in savegame.c 
 -new command: 'kick', an admin-command to kick a player from the server
 -added some info about logfiles in docs/README.files
 -added src/list.[ch] for linked list handling
 -fixed a possible problem with interrupted system-call fgets() in conn.c
 -changed the login process: 'login' just logs you in, 'addplayer' creates
  a new player.
 -logging to stderr now adds a timestamp like "Tue Dec 14 23:42:57 1999", too.
 -updates of README and docs/README.programmers
 -cosmetic changes in src/pcommands.inc
 -broadcast() now takes printf()-style arguments
 -every time a player loggs in/out, this is broadcast()ed to all players who
  are logged in
 -adjusted some lerror() error-messages
 -players are now stored in a linked list
 -removed first_free_player_slot(), which is obsolete now
 -added 'delplayer'. If you have admin-permissions you can delete any player. 
 -misc. documentation updates
 -If the game cannot be auto-saved htsserver exit()s. Fixed.
 -logging to syslog now logs via LOG_DAEMON instead of LOG_USER
 -improved time-calculation and other stuff in htslog()
 -misc. fixes and cosmetic changes
 -'retire' deletes your player.
 -added broadcast2players(), which sends a message to all players who are
  logged in, in contrast to broadcast(), which sends a message to all connected
  clients.
 -updated docs/PROTOCOL
 -rewrote h_retire; this might need some more fixing;
 -changed all perror() to lerror(), except for those in log.c
 -the directory ~/.htsserver/<gamename>/save is now created automatically.

v0.5.3 December 6, 1999
-----------------------
 -added file.[ch] -> functions for file-handling and tilde-expansion.
 -added savegame.[ch] for savegame support.
 -added periodic autosave.
 -fixed a bug which caused termination of htsserver when the alarm-signal
  used for autosaving interrupted select().
 -htsserver now logs _when_ it is started and _which PID_ it has.
 -added exitflag to misc.[ch].
 -'file' is default logging-destination now.
 -logfile, configfile and savegames are placed under ~/.htsserver/<gamename>
 -new networking commands: adminlogin, load, save, adminlogout, shutdown.
 -passwords/passphrases can now be as long as 80 characters.
 -fixed a small bug in load_from_file().
 -re-organized great parts of the code: moved all player-related code to
  player.[ch]; all command-handler functions are in pcommands.inc now
  moved lots of other code to some other location which hopefully fits better.
 -Changed the data-type 'connection' to 'conn_t'.
 -removed unnecessary #includes, updated the Makefile-dependecies.
 -removed the STRING_LEN #define from data.h
 -increased MAX_LEN_USERNAME to 30
 -renamed save/load to save_game/load_game, mainly because there's already
  some variables called 'save'.
 -added Makefile targets 'snapshot' and 'bz2snapshot'
 -added configfile support(cfile.[ch])
 -added a template configfile(htsserver.conf)
 -added config setting 'max_conns' to limit number of simultaneous connections.
 -documentation updates: README.files, man-page, FAQ, INSTALL, README
 -smaller fixes in strchop()
 -much more validity-checks in most functions of file.c and savegame.c
  most of those functions now return an int(for error-codes) instead of void
 -removed obsolete MAX_CONNECTIONS from conn.h
 -added c_unsigned_int() in cfile.c and changed autosave_delay to
  unsigned int, like alarm() expects it to be.
 -daemonize() now tries to close all filedescriptors; on error it only
  closes stdin, stdout, stderr as before.
 -added a small release plan to TODO
 -the calls to save_game() in misc.c now check for errors
 -all calls to strcpy() are proceeded by (void) now
 -recv_from_client() now returns -1 on failure, 0 on success
 -cosmetic changes in c_pchar()
 -some functions are more verbosive now, if errors occure
 -made the struct 'cf_ent_htab' and the pointer 'cfile' in cfile.c static 
 -small fix in c_unsigned_int()
 -rewrote 'struct configuration' to conf_t
 -fixed a bug in daemonize() which caused htsserver to not correctly close
  filedescriptors.
 -added getopt.[ch] and getopt1.c from glibc 2.0. This is required on
  systems which don't have getopt_long(). This is *not* properly tested yet! 
 -Removed all occurances of 'user' from the code and the documentation. These
  are replaced with 'player' mostly. This removes confusion between the two
  words, which mean the same thing mostly, anyway.
  players[].username is called players[].name now.
  all 'username's changed to 'playername's.
 -improved Makefile-targets 'distclean' and 'snapshot'/'bz2snapshot'
 -moved DEFAULT_ROOTDIR from config.h to file.c. This shouldn't be changed by
  the user.
 -changed DEFAULT_GAMENAME to 'defaultgame'.
 -added checkadminpasswd() to file.[ch]. This checks if 'adminpasswd' exists,
  is a regular file, is readable and writeable by us, doesn't have a
  permission mode higher than 0600, belongs to us, and is not a symbolic link.
 -You need to be logged in to use most networking commands
 -You need to be logged in as admin to use the admin-command. d'uh :-)
 -#define socklen_t as 'unsigned int' in the new portable.h, if it's not
  already defined -> fixes problems with SunOS.
 -smaller changes in cfile.c
 -began writing create_game() and create_gamedirs(), which don't work yet.
 -moved all "#include <sys/types.h>" before "#include <sys/socket.h>",
  because without this measure I get compile errors on SunOS
 -removed the variables logfile, daemon_stderr_device, server_port, etc.
  this information is now saved in the conf-struct.
 -If you send a SIGHUP to htsserver, it should re-read its configfile
 -added logged_in() and logged_in_as_admin() to simplify the code a bit.
 -made c_pchar() private to cfile.c. Removed its use in cmdline.c
 -changed config.h to defaults.h, to allow autoconf to create a config.h.
  This *could* have another name, but I want to stick with the standard-name.
 -"autoconfiscated" htsserver:
   * installation works like this: ./configure && make && make install
   * there are two new subdirectories: 'src' and 'docs'
   * the Makefile is gone; configure generates needed Makefiles
   * config.h(generated by configure) #defines some system-dependecies
   * INSTALL is replaced by the standard INSTALL-file from autoconf.
 -#included <config.h> in every src/*.c file
 -removed -D_GNU_SOURCE from CFLAGS in src/Makefile.am, this is already
  defined in configure.in.
 -removed VERSION in src/data.h, because this is already defined in config.h
 -documentation updates: README, TODO, docs/MANIFEST, docs/PROTOCOL,
                         README.files, README.programmers 
 -ported the targets 'snapshot' and 'bz2dist' to Makefile.am and 'lint' to
  src/Makefile.am
 -each perror() now shows the htsserver-function-name in which the error
  occured and the name of the system-call which failed, e.g.
  perror("create_socket:socket");
  I did the same for calls to fprintf(stderr,...), htslog() and lerror().
 -all typedef'ed structs now have the same name as their typedef-name
 -changes in goods.[ch]: renamed good to good_t, trader to trader_t and
  town to town_t 
 -added networking command 'reconfig'
 -added docs/ARCHITECTURES, which is a list of systems htsserver is known
  to work on.
 -the *.lsm file is now generated by configure from htsserver.lsm.in, but it
  still needs to be adjusted
 -removed send_exact() and recv_exact() from sock.[ch]. They're not needed 
  anymore.
 -the new htsprotocol 0.4 is documented in docs/PROTOCOL
 -added new config-option 'logdest' to the code and htsserver.conf.
  Did the same for 'run_as_daemon' and 'gamename'.
 -removed run_as_daemon from misc.[ch]. conf.run_as_daemon is used now.
 -moved create_game() to file.c
 -introduced the 'bool' typedef. This should clarify/simplify some code.
 -changed several data-types/return-values from int to bool
 -added comments to most functions/data-types in the src/*.h files
 -renamed the command 'name' to 'whoami'
 -the new primary homepage is http://htsserver.sourceforge.net/, which is
  mirrored at http://www.bingo-ev.de/~uh1763/linux/htsserver/index.html
 -added THANKS

v0.5.2 November 2, 1999
-----------------------
 -moved all #includes that weren't necessary in the *.h into the respective *.c
  this also solved some mysterious prototype errors.
 -improved the Makefile;
 -made server keep on running on errors instead of exit()ing in various places
 -htsserver can now behave like a real daemon: it can detach from the
  controlling terminal and run in the background if you use the commandline
  option --daemonize or set the compiletime option RUN_AS_DAEMON to 'YES'
  in config.h.
  If htsserver runs as daemon, you can also specify which device shall be
  used for error messages, using --stderr-device or the compiletime option
  DAEMON_STDERR_DEVICE in config.h. Reasonable values are /dev/console or
  /dev/null for example.
 -added function lerror() for use instead of perror(). It logs an error
  message in the form of '<function>: <errormessage>(<errno>)'
 -runtime errors that do not affect the functionality of htsserver are
  reported via the standard logging facility.
 -made chat() accept printf()-style messages
 -improved signal-handling; controlled shutdown on SIGTERM, SIGINT and SIGQUIT,
  and re-read config-file(which is not yet implemented) on SIGHUP. Moved all
  signal-related code to misc.[ch]
 -made net_buffer[] private to handle_input_from_client()
 -client_streams[] is history.
 -moved connection-related code to conn.[ch]
 -removed finduser_by_fd() since this info can be found in 'connection'.
 -changed finduser() to return a pointer to player.
 -added support for quoting command-arguments, i.e. arguments can now contain
  spaces, if the whole argument is quoted.
 -several changes in player-struct
 -everyone connected to the game is referenced through a pointer to his entry
  in conns[] now.
 -improved first_free_player_slot()
 -new commands: version, protocol, name, nop, logout
 -updated htsprotocol to 0.3.2 
 -documentation updates: man-page, README.programmers, PROTOCOL, FEATURES,
  BUGS, FAQ
 -introduced command handlers and corresponding handler table.
 -removed some compiler warnings about implicit declarations by specifying a
  load of __USE_* CPP defines in CFLAGS in the Makefile
 -removed messages.[ch]
 -server now denies login attempts for players who are already logged in from
  another connection.
 -added README.files which explains what files htsserver uses and what they
  contain
 -user and player are the same thing now; the username cannot be changed,
  because it is used to uniquely identify a user.
 -all networking commands are case-insensitive now
 -some functions are more secure now(i.e they use strncasecmp instead of
  strcasecmp etc.)
 -the list of users who are logged in(returned by 'who') is now comma-separated.
  this means usernames may not contain commas, but they may contain spaces.
 -misc. code-cleanups, fixed several typos in the documentation
 -many improvements of the connection-related code
 -added a function to broadcast a message to all clients
 -the bind() error message described in the FAQ will now be prevented
 -header dependecies in the Makefile are up-to-date again.

v0.5.1 October 24, 1999
-----------------------
 [NOTE: This release doesn't work with htsclient.ncurses 0.4.1. You can
  only test the protocol with telnet.]

 -improved README.programmers. Updated man-page to reflect the latest changes. 
 -moved the accept()-code in a function in sock.c
 -added file logging capability to htslog()
 -modified htslog() to take a printf-style message argument
 -changed HTSLOG_(NONE|ERROR|INFO|DEBUG) to be enums + other simplifications
 -the default verbosity-level, logging-destination and logfile can now
  be specified in config.h
 -changed type of server_port to be unsigned short int instead of socklen_t
 -changed type of clientaddrlen from int to socklen_t
 -added command line options --logdest(for the logging-destination, i.e.
  stderr, file or syslog) and --logfile.
 -removed most compiler warnings
 -made many functions(which needn't be exported) static.
 -various changes in the player-struct
 -added \n and \r to the list of delimiters in protocol.c
 -reorganized network/protocol code to use stdio file streams instead of
  file descriptors
 -New users are created by sending a usual login request w/ username and
  password. The server will ask "Create user?". Client should anser "YES".
 -removed the ID feature. Players are uniquely identified by their offset in
  the players[] list.
 -added support for 'quit' client-to-server command
 -removed the log_type option from htslog(). This is determined by
  --logdest=DEST now, or if you don't pass this option to htsserver the
  default value from config.h is used.
 -added functions send_to_client() + recv_from_client() to net.[ch] for
  convenient line-based client-server communication
 -added user management. Users stay valid as long as the server is running.
 -removed need for client to send 6-byte stringlength before each command.
 -Added support for the command 'who', which sends a list of all players who
  are logged in to a client.
 -removed the function print_version(). Its contents are directly in the code
  now.
 -'make lint' now works without quitting because of parsing-errors.
 -there's a very basic chat-engine now; it uses the protocol-command 'chat'
 -'help'-command is written.
 -htsserver will close connections on errors.
 -started writing the Makefile-target 'update' which shall change everything
  that needs to be changed when a new version is written(e.g. MANIFEST,
  *.lsm + its contents, data.h etc.)
  When this is finished you will only need to change VERSION in the Makefile and
  then say 'make update'.
 -updated PROTOCOL to htsprotocol 0.3.1
 -simplified many parts of the code
 -there's a username and a playername now. The username is used for logging
  in to htsserver, the playername is the name that everybody in the game will
  see when meeting you / trading with you.

v0.5 October 3, 1999
--------------------
 -removed the directory old/ and its contents. Parts of it might still be
  used in later versions of htsserver, though.
 -improved logging code. You can now decide how much you want to log.
  Use the commandline-option -v (or --verbosity) for this. Type
  htsserver --help for details.
  moved the code from misc.[ch] to log.[ch].
 -some validity-checks are done for commandline-options now.
 -I updated the manpage
 -a basic networking code is working now.
  The server should accept a login-request and answer it
 -lots of code-cleanups; there are fewer compiler-/lint-warnings now
 -FEATURES gives an overview of the (planned) features of htsserver.
  For now, consider this as a wishlist.
 -smaller updates of the documentation

v0.4.2 September 14, 1999
-------------------------
 -added a lsm-file (htsserver-0.4.2.lsm)
 -changed the first line of each *.[ch] file from
  "Holsham Traders - a trading game" to
  "htsserver - the server application for the trading game Holsham Traders"
 -version 0.3 of the htraders protocol is written
 -lots of changes/additions in the man-page, Makefile, MANIFEST, TODO, INSTALL
  and README.programmers
 -added config.h and protocol.[ch]
 -there's a FAQ now
 -htsserver now uses select() instead of forking off a new process for each
  client. That would have meant a need for IPC.
 -moved the signal-handling function out of net.c, because it hasn't really
  todo anything with networking :-)
 -added the NEWS file, where major changes are documented
 -fixed small bug in cmdline.c
 -added a note about the GPL to the text displayed when you
  start htsserver with the option -h or --help.
 -I decided that Holsham Traders will be a realtime game, not round-based.
 -misc. smaller changes

v0.4.1 August 16, 1999
----------------------
 -added conn.[ch], which will handle the connections of the server
 -htslog() now allows logging to stderr, a file and syslog.
 -many code cleanups
 -various changes in the READMEs
 -the new URL of the homepage is
  http://www.bingo-ev.de/~uh1763/linux/htraders.html
 -improved the Makefile a bit
 -renamed MESSAGE_LANGUAGE to PROTOCOL. Added lots of stuff to PROTOCOL.

v0.4 July 12, 1999
------------------
 -this release is broken. It won't do anything useful, maybe it won't even
  compile.
 -the game is now client/server based. The server is called htsserver,
  the client I currently develop is called htsclient.ncurses.
  Server and client will be distributed seperately from now on.
  Get them both from http://www.bingo-ev.de/~uh1763/linux/htraders.htm.
  See README.programmers and MESSAGE_LANGUAGE for more details on the
  server/client architecture.
 -changed every ht* to hts*, because I don't want confusion with some htdig
  programs(htdig, htfuzzy, htmerge etc.)
 -updates in README.programmers
 -most of the code should compile on an ANSI C compiler now
 -better code documentation / clearer code
 -the whole code is nearly a complete rewrite from scratch. Most of the
  code of version 0.3.x is in the directory old. Most of it will be reused
  when the basic networking code is done.
 -renamed CHANGES to ChangeLog
 -added some alpha networking code
 -the Makefile has a better 'make archive' and an additional 'make bz2archive'
  option now
 -as usual, lots of smaller changes
 -added some commandline-options, such as --help, --version etc.
  type "htsserver --help" for details.
 -I wrote a manpage for htsserver(6).
 -added a INSTALL-file

v0.3.0 February 6, 1999
-----------------------
 -added the 'make archive' option to the Makefile
 -changed the permissions from 600/700 to 644/755, so that the game
  can be installed by root, and used by everyone.
 -several updates in the README
 -transporter location added
 -drive() is written
 -there's a 'time' structure now
 -major rewrites of the Makefile and many header-files, but it still isn't
  perfect
 -added README.programmers
 -scrolling in the list of goods is now possible
 -colors are used in this release
 -small changes of the structure of the code
 -I read the Software-Release-Practice-HOWTO by Eric S. Raymond, and tried to
  follow most of the things mentioned in the HOWTO.
 -lots and lots of code cleanup and other minor changes
 -added distances and a basic calculate_remaining_time()
 -renamed specs-0.2.txt to README.specifications
 -buy() and sell() can now be tested on screen...
 -added checks.c and checks.h, some checks are already written
 -removed several bugs
 -the cursor is invisible now
 -added a 'buy-window' where you can enter the amount of goods you want to buy.
 -named this version 0.3.0 because there are many major improvements.
 -put some code from output.[ch] in scroll.[ch], and some in data.h
 -there's a log-window now, where you see incoming messages/errors etc.
 -added AUTHORS to the package
 -removed ncurses/data.c
 -wrote file.c and file.h (code for logfile)
 -made several updates in data.h
 -new: you_have_enough_free_capacity();
 -the directory ~/.htraders and the file ~/.htraders/logfile are created at
  startup. Doesn't work very well yet(read the README).

v0.2.2 January 8, 1999
----------------------
 -complete rewrite of buy() and sell()
 -some more structures and types are declared now
 -removed some bugs
 -several other 'cosmetic' changes
 -now the program shows a demo of the buy() and sell() functions

v0.2.1 January 7, 1999
----------------------
 -specs-0.2.txt is written
 -some small 'cosmetic' changes

v0.2 January 4, 1999
--------------------
 -buy() and sell() are written!
 -there's a simple ncurses trade menu, now.
 -added stuff to the README

v0.1 January 3, 1999
--------------------
 -this is the first public release, available at
  http://www.bingo.baynet.de/~uh1763/linux/htraders.htm
 -written some code, e.g the 'buy' function, changed some structures
 -reorganized everything, so it can be put on my homepage
 -updated the specs and renamed the file to specs-0.1.txt
 -no more data-files needed. everything's generated by rand() now.

v0.1 pre-3
----------
 -added some things to the specs-0.1-pre3.txt
 -the whole ncurses code has now its own subdirectory
 -the structures for towns, goods and transporter should now be
  somewhat finished, and will change less frequently.

v0.1 pre-2
----------
 -rearranged loads of code
 -added 'make install' and 'make clean' ability to the Makefile
 -renamed specs-file to specs-0.1-pre2.txt and improved it a little bit

v0.1 pre-1
----------
 -came up with the idea somewhen in December 1998 
 -wrote specs-0.1-pre1.txt, a nearly-empty Makefile and a basic main.c
 -began to write a README and CHANGES file, added COPYING into the directory
