sjstein / R8DIUM

A discord bot to manage individual run8 users
GNU General Public License v3.0
2 stars 0 forks source link

Stretch Goal: functionality to download Industry config, AITraffic config, World save #78

Open jackfruh opened 8 months ago

jackfruh commented 8 months ago

Users often want to replicate a server's environment locally so they can practice offline.

The files of interest would be: Content\V3Routes\Regions[region]\AutoSaves\Auto Save World.xml Content\V3Routes\Regions[region]\Config.ind Content\V3Routes\Regions[region]\Traffic.r8

Admins without RDP access may also want these files to test certain recovery scenarios. For these scenarios, additional world saves would be valuable. I suspect a similar mechanism used with user listings would work.

(ie: [1] Auto Save World 2023.10.11 10.00.00.xml [2] Auto Save World 2023.10.11 09.50.00.xml [3] Auto Save World 2023.10.11 09.40.00.xml )

In fact, if you wanted to be super clever... /Restore_Worldsave 3
This command could shut down the server, swap the current world save for the 3rd oldest and restart the server.

sjstein commented 8 months ago

Sending a file doesn't seem like an issue on the surface as discussed here, however there is mention of the bot "having to open the file before sending" which may cause problems with the binary files.

Easy to test however. Assigning myself.

sjstein commented 8 months ago

Seems to be working fine. Can add options in config file specifying which files are available and their locations

sjstein commented 8 months ago

New branch for this created: 78_file_download

sjstein commented 8 months ago

I think this is a good point to expand on how configparser can take advantage of being a dict to allow a variable number of file types to be defined. Basically a key:value pair for {(short)file name : file path}

e.g.

{ 'hump' : 'c:\program files\run8studios\content\socal\hump.cfg' }

sjstein commented 7 months ago

add the ability to download the log file and the hostsecurity file to admins only