midspace / Space-Engineers-Admin-script-mod

Modding script for Space Engineers with dozens of Admin commands for creating game scenarios or supporting servers.
44 stars 13 forks source link

Enable automatic timed and scheduled messaging #76

Open zrisher opened 9 years ago

zrisher commented 9 years ago

It would be great if admins could set automatic notifications to be displayed to all players, i.e.:

and

Obviously the color argument could be optional, default to white. And you could add another optional arg for notification length.

Now that you guys have implemented server-client messaging this should be much easier to achieve.

midspace commented 9 years ago

The only problem I have with this is, a lot of hosted servers won't be in the same timezone, and I see plenty of instances where clocks do not keep up to date with ntp servers. Its easy enough to get around, by using the user/client time and gettin the difference and sending the TimeSpan to the server instead. It just comes down to educating the users to use their local clocks and not the server.

zrisher commented 9 years ago

While I think most users doing scheduled notifications will likely already be aware of the local timezone for their server, some education or adaption could be helpful.

But you have to be careful or provide an alternate option because some things are being scheduled in relation to the actual server clock. I.e. I know that my server will restart at 04:00 and 17:00 every day according to its clock, so I want my notification to occur at 3:59 server time. If that corresponds to 3:56 my time because the server clock is 3 minutes fast, I want still want it to be 1 minute before the restart and not 4.

Spcemarine commented 8 years ago

The command's syntax is gonna be a little complex: Syntax: /scheduledmessage <add|remove|list|enable|disable> <title> <notification[:color]|chat> <intervall|fixed> [startTime] [level], <message>

Title: A unique Id to identify the scheduled message and remove it later, in general to work with it. StartTime: timestamp where the timer starts, default: DateTime.Now

Level: required level to see the message (permission), default: 0

There is a comma before the message because there are optional parameters in the command. Any comments are welcome.