Please see e54385991's post below (many thanks for fixing in my absence) for the fixed version, I no longer maintain this plugin.
A pretty simple plugin that does what it says, cleans up old logs, sprays and automatic demo files. It does this every map start.
Configure the attached config and upload or edit the automatically generated config when you run the plugin. You can control how long to keep files of different types and whether to include archives for demo files. The default config WON'T delete anything until you set it up.
servercleanup.smx -> addons/sourcemod/plugins/
servercleanup.phrases.txt -> addons/sourcemod/translations/
plugin.servercleanup.cfg -> cfg/sourcemod/ (optional, automatically generated)
Hungarian (WARNING: NOW OUTDATED
(thanks blue zebra!)
Should work on any SM version, if you have any problems just post and give me any errors you get plus your config.
This plugin should be fine BUT I am not responsible for any loss of data or damage to your server that this plugin may or may not cause
. Saying that though, I've tested it pretty thoroughly and it seems to be A-OK.
I have to thank sslice for his plugin Spray Pruning to give a good idea of how to attack this plugin, so much thanks! I highly recommend using his plugin if spray cleaning is all you need.
- Initial public release.
- Added full translation support to convars.
- Added new cvar to control what type of logs to delete (normal logs, normal + error logs, all logs).
- Added a command to manually execute clean up "sm_srvcln_now" (set to root only).
- Added a convar to control whether server clean up automatically cleans up on map start or not (enabled by default).
- Detection code totally rewritten.
- Fixed a small memory leak.
- Added support to clean up sprays.
- Added cvar "sm_srvcln_demos_path" so users can point to an optional location to their demo files.
- Added proper directory detection.
- Fixed translation errors.
- Fixed issue if you installed the plugin on a fresh server it would complain about the downloads directory being missing.
- Removed warnings about directories, only confuses users.
- Fixed return on "clean now" command.
- Removed an old check for the spray folder.
- Added WarMod support.
- Added round backup clean up for csgo in default form.
- New minimum time of 12 hours is now allowed, also added a super clean mode for all time cvars using -1 which just keeps the current days files.
- Added a cvar to optionally log what gets deleted.
- Fixed round backup clean up for csgo to use the proper cvar for setting the round backup file name prefix, thanks SanKen!
- Added support for replay cleaning and steampipe spray cleaning.
- Added cvar to control whether to check for archives too when cleaning replays.
- Added a more thorough check on the round backup files to prevent the deletion of important text files in the case of the mp_backup_round_file being empty.
- Fixed memory leaks and optimised some code (thanks 11530!)