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

[sdtdserver] Feature request: announce server restarts ingame via telnet #674

Open
pix0wl opened this issue Feb 5, 2016 · 6 comments · May be fixed by #4488
Open

[sdtdserver] Feature request: announce server restarts ingame via telnet #674

pix0wl opened this issue Feb 5, 2016 · 6 comments · May be fixed by #4488

Comments

@pix0wl
Copy link

pix0wl commented Feb 5, 2016

Hello,

I don't know if this is possible, but it would be very helpful, if the user could be warned via ingame chat, when the server will be restarted.
From about 30 minutes before comes the first announcement, then 15 mins and then maybe from the 5th minute starts an minute countdown.

Periodic reboots are pretty important in 7 days to Die, not only for performance reasons, it fixes also temporary bugs.
Thanks for reading.

@UltimateByte
Copy link
Contributor

Hey.

I like the idea to at least send a message when it's rebooting, wouldn't be that hard and could also be applied to other games. The only difference between game implementation would be the way it's done. The easiest implementaiton would be for games that allow to input server text directly into the console.

For a scheduled reboot including a timer though, i'm not sure how it would be implemented, but i thought about that quite a lot too, to inform players before it happens so they don't lose important stuff. Maybe a new function like scheduled-reboot would be required, with a timer to set. It would inform of the auto reboot 120 minutes before, then every 30 mins, then 15mins before, 10m, 5m, 4m, 3m, 2m 1m, 30s, 15s, 10s, 9... all the way to 1, then display "Server rebooting".

@jaredballou
Copy link

Yeah this is a neat idea, maybe have a restart_delay setting that defaults to 10 seconds. When the update-restart or restart command is run, it uses tmux to "say restarting server in 10 seconds..." And then sleep until it runs the restart command. Probably want to include shutdown as well, so users know what's up.

Just need to gather a few things

  • what commands for each game?
  • how to handle the situation where a user has typed text into console but not hit enter
    ** do we want to just send an Enter and run whatever is in the buffer?
  • do we want to add an "immediate" shutdown/restart option for skipping the timer?

@UltimateByte
Copy link
Contributor

what commands for each game?

Well, for source games, "say Server rebooting/stopping in x mins y seconds"
For other games... I don't know.

how to handle the situation where a user has typed text into console but not hit enter ** do we want to just send an Enter and run whatever is in the buffer?

Seems lilke i'm not the only one it happened to ! As "stop" command now tries to send a "quit" command then closes the process after 30s if it doesn't stop, the problem is already solved : such function would simply use the native stop/start commands (after the timer).

do we want to add an "immediate" shutdown/restart option for skipping the time

Nope, we would want to keep stop/restart unchanged, but add new commands, something like : timer-stop / timer-restart.

@jaredballou
Copy link

No, what I mean is, let's say Joe User runs "insserver console" and is in a tmux session. He then types
map ministry
and DOESN'T hit Enter. So that command is just sitting in the buffer. If we just blindly send an "Enter" before our commands to make sure the prompt is clean, we may end up doing something we don't want. Like, if they typed "exit" and left it there. But we need to clear that command somehow, otherwise piping the say command won't work. I'm not sure what the best way to do this is, I know I could do it with rcon but that opens up a whole new set of issues. So I'm trying to figure out how we can handle that is all.

@UltimateByte
Copy link
Contributor

This seems not convenient for the end user to have to keep something into the console.
If by mistake, you keep, let's say "exit" in the console, then exitsay Server rebooting in 10 minutes , it will just not work. So the second notification for 5 minutes will hapen successfully, and that's OK that way. One should just not keep pre-typed stuff into the console anyways.
RCON is not in the program right now, "keep it simple" would be the way to go. It's already an advanced option that a very few people would use, no need to make it inhuman > Add a new parameter > add a new command >> allow to setup a custom message before shutting down/rebooting >> everybody happy.

(Makes me think about a new idea i had before, to improve the monitor function, i'm gonna talk about that into the topic.)

@dgibbs64
Copy link
Member

A possibility with the integration of gamedig is to schedule a reboot only once all players have exited the server

@dgibbs64 dgibbs64 added type: feature request New feature or request game: 7 Days to Die and removed type: feature request New feature or request Type: feature labels Apr 1, 2018
@dgibbs64 dgibbs64 removed this from the Improve handling of auto restart milestone Dec 12, 2018
@dgibbs64 dgibbs64 removed type: feature request New feature or request labels Feb 1, 2019
@dgibbs64 dgibbs64 added the type: feature request New feature or request label Jun 20, 2019
@MicLieg MicLieg linked a pull request Feb 6, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants