TShock icon indicating copy to clipboard operation
TShock copied to clipboard

`/off-nosave` is saving world

Open Arthri opened this issue 2 years ago • 4 comments

  • TShock version: 5.1.3
  • TShock build number (if known): N/A

Reproduction steps (if applicable)?

  1. Start server
  2. /off-nosave

Any stack traces or error messages (if known)?

Server executed: /off-nosave.
Server shutting down.
Saving before exit...
Saving world...
Saving world data:
Validating world save:

Any screenshots?

None

Any log messages from files that end in .log or .txt? What are the last 100 log messages from the server console?

2023-04-29 00:03:06 - TShock: INFO: TShock 5.1.3.0 (Thank you, everyone, for your support of TShock all these years! <3) now running.
2023-04-29 00:03:06 - TShock: INFO: AutoSave Enabled
2023-04-29 00:03:06 - TShock: INFO: Backups Enabled
2023-04-29 00:03:06 - TShock: INFO: Welcome to TShock for Terraria!
2023-04-29 00:03:06 - TShock: INFO: TShock comes with no warranty & is free software.
2023-04-29 00:03:06 - TShock: INFO: You can modify & distribute it under the terms of the GNU GPLv3.
2023-04-29 00:03:11 - TShock: INFO: Login before join enabled. Users may be prompted for an account specific password instead of a server password on connect.
2023-04-29 00:03:11 - TShock: INFO: Login using UUID enabled. Users automatically login via UUID.
2023-04-29 00:03:11 - TShock: INFO: A malicious server can easily steal a user's UUID. You may consider turning this option off if you run a public server.
2023-04-29 00:03:12 - Utils: INFO: Server executed: /off-nosave.
2023-04-29 00:03:12 - Utils: INFO: Broadcast: Server shutting down.
2023-04-29 00:03:12 - Utils: INFO: Broadcast: Saving world...

What plugins and what versions of those plugins are you running?

None

Arthri avatar Apr 28 '23 16:04 Arthri

Terraria's server loop is saving the world. Terraria has a separate field(Netplay.SaveOnServerExit) for controlling save on exit

Arthri avatar Apr 28 '23 16:04 Arthri

This is to not save the DATABASE for if a batabase error accours

ghost avatar Oct 02 '23 15:10 ghost

This is to not save the DATABASE for if a batabase error accours

The command explicitly specifies to not save the world, but it fails now because Terraria has implemented a different pathway since then

https://github.com/Pryaxis/TShock/blob/b1a054472fcabd14182c9dd1ec7fa3871ab9eb39/TShockAPI/Commands.cs#L2044-L2047

https://github.com/Pryaxis/TShock/blob/b1a054472fcabd14182c9dd1ec7fa3871ab9eb39/TShockAPI/Utils.cs#L575-L580

Arthri avatar Oct 02 '23 17:10 Arthri

Added the proposal from @Arthri. Checked it and should work now.

Metratrj avatar Jan 30 '24 16:01 Metratrj