News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Expose pause_server_no_clients as a CLI argument

Started by Michael 'Cruzer', June 13, 2020, 11:02:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michael 'Cruzer'

Given that many of the server related options such as server name, server announcement or dns can currently be configured either as CLI parameter or as config value in the simuconf.tab, would it also be possible to expose the pause_server_no_clients option as CLI parameter too? Maybe as a new -server_pause_no_client CLI flag (that naming would be inconsistent with the simuconf.tab, but would be consistent with the other CLI options). Currently this option is only configurable over the simuconf.tab as far as I'm aware of it.

I don't think it should be too hard to implement: pause_server_no_clients seems to be a simple flag on the env_t singleton. Similar code to which already sets the env_t::announce flag in the simmain.c could also set the pause_server_no_clients flag. Thought, I amn't sure yet when/where the loading of the simuconf.tab values happens and how to ensure that these values don't override the CLI parameters.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

prissi

Since the -pause flag is ignored for a server anyway, "-pause" on the command line will start a server wihich pauses without clients for r9131. The change is rather trivial and could be backported to the stable as well.

Michael 'Cruzer'

Thanks! Yes, extracting commit 9131 as patch and applying it on the latest stable 121.0/r8870 seems to work without any issues.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.