Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: civserver -r does not work properly. (PR#878)
Home

[Freeciv-Dev] Re: civserver -r does not work properly. (PR#878)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: civserver -r does not work properly. (PR#878)
From: Reinier Post <rp@xxxxxxxxxx>
Date: Tue, 7 Aug 2001 11:30:54 +0200

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.
> 
> Script started on Tue Aug  7 01:54:26 2001
> gs234@kern:~/freeciv$ cat fc_test 
> set seed 42
> set randseed 42
> set minp 1
> set maxp 5
> set aifill 5
> set timeout 1
> hard
> create ai
> start

[...]

> gs234@kern:~/freeciv$ ./ser -r fc_test 
> This is the server for Freeciv version 1.11.11-devel
> You can learn a lot about Freeciv at http://www.freeciv.org/
> Option: seed has been set to 42.
> Option: randseed has been set to 42.
> Option: minplayers has been set to 1.
> Option: maxplayers has been set to 5.
> Option: aifill has been set to 5.
> Option: timeout has been set to 1.
> Setting game.skill_level to 7.
> 2: ai has been added as an AI-controlled player.
> Created new AI player: ai.
> Starting game.
> 2: Now accepting new client connections.

It claims to start the game, and doesn't.

> For introductory help, type 'help'.
> > quit
> Goodbye.

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.

-- 
Reinier


[Prev in Thread] Current Thread [Next in Thread]