On Tue, Aug 07, 2001 at 11:30:54AM +0200, Reinier Post wrote: > On Mon, Aug 06, 2001 at 06:03:10PM -0700, Gaute B Strokkenes wrote: > > > > cviserver seems to act differently depending on whether it is > > receiving commands from stdin or from a startup script. > > > > This is counterintuive, and probably not intentional. [...] > The -r option reads the file sooner than a /read command or manual entry: > > http://www.freeciv.org/lxr/source/server/srv_main.c?v=cvs#L178 > > The server hasn't even read the savefile at that point (if -f is used). > Executing -r should be delayed until a server command prompt appears. > /start will work and /create will no longer appear to work when -f is used. > > If both -r and -f are used, which will take precedence in case of conflicts? > This is important if server options are saved to the savefile. I don't recall > a statement of policy regarding whether they ought to be. Attached is a patch to invert this, making -r equivalent to a /read as the first command. Additionally, it implemnts a suggestion made by dwp in a comment: read_init_script gets a caller argument, so it can send an error message to clients with 'hack' permissions that issue a /read. -- Reinier