JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
553 stars 127 forks source link

[Bug]: It is possible for dedicated server to stop being a server. #650

Closed James103 closed 4 months ago

James103 commented 5 months ago

Version of OpenTTD

jgrpp-0.57.1

Expected result

A dedicated server should always be a server.

Actual result

It is possible for a dedicated server to stop being a server, instead reverting to standard client behavior (server-only commands not working, possible to connect to other servers, etc) except without a GUI.

Steps to reproduce

  1. Start a dedicated server with openttd -d.
  2. Run the console command connect. The command fails with ERROR: This command is not available to a network server.
  3. Run the console command part. This command succeeds when it should either fail or act the same as exit.
  4. Run the console command connect again. Notice this time the command doesn't fail, as the dedicated server process is no longer a server.
JGRennison commented 4 months ago

Fixed by https://github.com/OpenTTD/OpenTTD/pull/12075