Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server save script improvements #3192

Merged
3 commits merged into from
Sep 20, 2021
Merged

Server save script improvements #3192

3 commits merged into from
Sep 20, 2021

Conversation

omarcopires
Copy link
Contributor

Now the map will not be cleared before restarting the server.

Copy link
Member

@DSpeichert DSpeichert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the previous version opening the server back. Did it make sense? Was there a reason for it?

@omarcopires
Copy link
Contributor Author

Não vejo a versão anterior abrindo o servidor de volta. Fez sentido? Havia alguma razão para isso?

There is no reason to be able to clean if you will shutdown to restart it.

@Zbizu
Copy link
Contributor

Zbizu commented Nov 15, 2020

how is this script supposed to save server when it doesn't have saveServer() anywhere? (also applies to the one we currently have in tfs)

also while we're at it, why there is no /save talkaction?

@MillhioreBT
Copy link
Contributor

MillhioreBT commented Feb 26, 2021

I don't see the previous version opening the server back. Did it make sense? Was there a reason for it?

I agree with @DSpeichert
the only situations in which the server is actually saved is when it is closed or when it is shut down, why is this event called ServerSave? if your main purpose is not really to save the server every so often, the name LastServerSave makes more sense :D

I always thought this was a mistake, I had to create my own custom event for this purpose, since the current script is useless, it is not useful at all

However, what you propose fixes what did not work before 🤩 👏

MillhioreBT
MillhioreBT previously approved these changes Feb 26, 2021
@DSpeichert
Copy link
Member

It still doesn't actually call saveServer as @Zbizu pointed out.
I understand that by closing the server, it kicks people out, which in turns saves all those players that were kicked out - but not those that are immune to server closing via special permissions.

Do we want to keep that behavior with closing the server or use the saveServer function instead?
I'd think that if you kick all the players (by closing server) you might as well restart it.

@DSpeichert DSpeichert requested a review from a user February 27, 2021 16:41
@ghost ghost requested a review from DSpeichert August 25, 2021 04:06
@DSpeichert DSpeichert assigned ghost Sep 18, 2021
@Zbizu
Copy link
Contributor

Zbizu commented Sep 18, 2021

kicking players is ok - they get saved before everything else so no rollback will happen in case of crash on save scenario

however, saveServer has to be called in order to save houses

Clean can be executed last, after everything was saved.

ghost
ghost previously approved these changes Sep 18, 2021
@ghost ghost merged commit c9a65a8 into otland:master Sep 20, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants