yer-mtd / hammertime

Extended moderation for vanilla Minecraft servers
GNU General Public License v2.0
3 stars 1 forks source link

Re-read the screen session ID for each command output to console #5

Closed blockbandit closed 7 years ago

blockbandit commented 7 years ago

When Hammertime is started, it reads the screen session id and keeps it in memory. For as long as Hammertime is running, it will attempt to write to this session id with screen -S $sessionid -X stuff [...]

Depending on how the Minecraft server does its periodic restarts, there may be a new screen session id. Hammertime will still try to write to the stale screen session id. It is desirable to have Hammertime determine the screen session id each time it has to output to it instead of using the session id from when Hammertime is started.

yer-mtd commented 7 years ago

I think a better solution might be to restart hammertime as well with the server. I will include dynamic screen ID updating, as an option.