quarantin / pz-server-tools

A set of tools to help you with running a Project Zomboid game server (Linux only)
GNU Affero General Public License v3.0
63 stars 13 forks source link

Changing restart text #27

Closed Direct3D01 closed 1 year ago

Direct3D01 commented 1 year ago

I'm not sure if this is an issue but I wanted to edit the restart sequence text to "10 minutes" instead of the original "10:00 minutes" as some players got confused about it.

The only file I found about this is in pz-server-tools/pzserver/pzrestartjob.

Apparently this file does nothing (maybe a source code).

Question: is there a way to edit the warning text?

quarantin commented 1 year ago

What makes you think this file does nothing? At the moment the warning text is not editable, but if you simply want to remove the ":00" I can take care of it.

Direct3D01 commented 1 year ago

But I tried it, restarted the server multiple times and it kept the same config as before and it didn't even throw any error at me.

I would appreciate if you could just remove it. Not the most important thing to take care of, I know, but still...

quarantin commented 1 year ago

I Just pushed a fix. Check here to see how to apply the update: https://github.com/quarantin/pz-server-tools/blob/main/docs/INSTALL.md#updating-project-zomboid-server-tools

Direct3D01 commented 1 year ago

Hey, works well, except for one problem:

"LOG : General , 1683314201099> 1,395,088,542> command entered via server console (System.in): "servermsg "Restarting server in 1 minutes"" LOG : General , 1683314201121> 1,395,088,563> Message sent. LOG : General , 1683314501434> 1,395,388,877> command entered via server console (System.in): "servermsg "Restarting server in 5 minutes. Find a safe place to hide for restart!"" LOG : General , 1683314501503> 1,395,388,946> Message sent. LOG : General , 1683314681642> 1,395,569,085> command entered via server console (System.in): "servermsg "Restarting server in 2 minutes. Find a safe place to hide for restart!"" LOG : General , 1683314681706> 1,395,569,148> Message sent. LOG : General , 1683314741710> 1,395,629,153> command entered via server console (System.in): "servermsg "Restarting server in 1 minute. Find a safe place to hide for restart!"" LOG : General , 1683314741806> 1,395,629,248> Message sent."

There is a zero missing from the first warning. Thanks for your work!

quarantin commented 1 year ago

Could you try a patch and let me know if it's working for you?

From pzstadmin account:

wget -O /tmp/pzrestartjob https://raw.githubusercontent.com/quarantin/pz-server-tools/develop/pzserver/pzrestartjob
sudo cp /usr/local/bin/pzrestartjob /usr/local/bin/pzrestartjob.bak
sudo cp /tmp/pzrestartjob /usr/local/bin/pzrestartjob

Then restart the pzserver and check if it fixes the issue.

Direct3D01 commented 1 year ago

I can tell you tomorrow as currently players are online.

Direct3D01 commented 1 year ago

"pzserver1: Sending message: Restarting server in 0:100 minutes pzserver1: Sending message: Restarting server in 050 minutes. Find a safe place to hide for restart! pzserver1: Sending message: Restarting server in 020 minutes. Find a safe place to hide for restart! pzserver1: Sending message: Restarting server in 010 minute. Find a safe place to hide for restart! pzserver1: Stopping now!"

quarantin commented 1 year ago

OK, sorry for this. I pushed a new fix on the main branch. Hopefully I got it right this time:

LOG  : General     , 1684175293528> 23,626,383> command entered via server console (System.in): "servermsg "Restarting server in 10 minutes""
LOG  : General     , 1684175293649> 23,626,505> Message sent.
LOG  : General     , 1684174826259> 23,159,114> command entered via server console (System.in): "servermsg "Restarting server in 2 minutes. Find a safe place to hide for restart!""
LOG  : General     , 1684174826369> 23,159,224> Message sent.
LOG  : General     , 1684174886312> 23,219,168> command entered via server console (System.in): "servermsg "Restarting server in 1 minute. Find a safe place to hide for restart!""
LOG  : General     , 1684174886401> 23,219,257> Message sent.

Please close this issue if the fix works for you.

quarantin commented 1 year ago

Closing this issue. Feel free to reopen if the fix isn't working for you.