ServerMod / MultiAdmin

SCP: Secret Labratory Server modification to support different configs per instance plus a whole lot of other features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Servers fail to start with duplicate MultiAdmin configuration keys, similar to #166

PatPeter opened this issue · comments

Like issue #166, if multiple MultiAdmin keys are added to a server config on accident, for instance:

# MultiAdmin Settings
manual_start: false
#start_config_on_full:
#shutdown_once_empty_for:
#restart_every_num_rounds:
restart_low_memory: 768
restart_low_memory_roundend: 512

#Server main settings
server_name: ...
sm_server_name: ...
serverinfo_pastebin_id: ...
server_ip: ...
contact_email: ...
max_players: 20
port_queue: 7777
dedicated_slots: 5
manual_start: true

Then the config will fail to load and the Smod2 server will not start:

[22:08:37] >>>
[22:08:37] Sending request to SCP: Secret Laboratory...SCP Secret Laboratory/config_gameplay.txt
[22:08:36] Using multiple server mode
[22:08:37] Failed to open log for github error submission, the SCPSL exe for that session is still shutting down.
[22:08:37] Started new session.ce with config directory: scp3
[22:08:37] Executing: /home/steam/scp/SCPSL.x86_64
[22:08:37] Config file swapped
[22:08:37] Starting server with the following parameters
[22:08:37] /home/steam/scp/SCPSL.x86_64 -batchmode -nographics -key1531364916 -silent-crashes -id3462 -logFile "servers/scp3/logs/2018-07-11_22_08_SCP_output_log.txt"
[22:08:37] MultiAdmin for SCP: Secret Laboratory made by Courtney (Grover_c13), Dankrushen, PatPeter, and SlenderPlays.
[22:08:37] Heavily modified but based off LocalAdmin by Hubert Moszka.
[22:08:37] You can request LocalAdmin source code at moszka.hubert@gmail.com.
[22:08:37] You can find MultiAdmin source code at https://github.com/Grover-c13/MultiAdmin/.
[22:08:37] Released under CC-BY-SA 4.0
[22:10:14] Command  does not exist!6_64 -batchmode -nographics -key1531364991 -silent-crashes -id3514 -logFile "serv[22:10:16] >>> 818;1R
[22:10:16] Sending request to SCP: Secret Laboratory...y Courtney (Grover_c13), Dankrushen, PatPeter, and SlenderPla[22:10:16] Command 818 does not exist!; Command 1R does not exist!
[22:10:25] Config file swappedalAdmin source code at moszka.hubert@gmail.com.
[22:10:25] Reloading configtiAdmin source code at https://github.com/Grover-c13/MultiAdmin/.
[22:10:25] if the config opens in notepad, dont worry, thats just the game. It should be reloaded.
[22:10:25] Sending request to SCP: Secret Laboratory...
[22:10:26] Command CONFIG failed to excute and threw an exception:
Please use ReloadGameConfig() with arguments first!
  at ConfigFile.ReloadGameConfig () [0x00000] in <filename unknown>:0
  at GameConsole.Commands.CommandConfig.OnCall (System.String[] args) [0x00000] in <filename unknown>:0
  at GameConsole.SmodCommand.OnCall (Smod2.Commands.ICommandSender sender, System.String[] args) [0x00000] in <filename unknown>:0
  at GameConsole.Console.CallCommand (Smod2.Commands.ICommandSender sender, System.String command, System.String[] args) [0x00000] in <filename unknown>:0

Notice that there is no mention of a port anywhere. Weirdly enough, I can still run Smod2 commands such as help and they work appropriately. It loads the console interface but not the networking.

This is normal for duplicate Dictionary entries, I don't believe any YAML parser would allow you to do that. Plus this actually uses a dictionary so it totally will be affected in the same way.

That's my point: it shouldn't cause the server's netcode to fail to load just because of an invalid config setting. It should be updated with the most recent version of the config setting and start the server, just like the Source engine or Unreal engines do.

Well, even professional YAML parsers throw an exception for stuff like that

Kigen fixed it