View Single Post
Author Message
Jamster
Veteran Member
Join Date: Jun 2008
Old 12-20-2009 , 10:55   Server Clean Up (1.2.2)
Reply With Quote #1

Please see e54385991's post below (many thanks for fixing in my absence) for the fixed version, I no longer maintain this plugin.
https://forums.alliedmods.net/showpo...&postcount=190

About

A pretty simple plugin that does what it says, cleans up old logs, sprays and automatic demo files. It does this every map start.

Configuration

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.

Installation

servercleanup.smx -> addons/sourcemod/plugins/
servercleanup.phrases.txt -> addons/sourcemod/translations/
plugin.servercleanup.cfg -> cfg/sourcemod/ (optional, automatically generated)

Translations

Hungarian (WARNING: NOW OUTDATED): http://forums.alliedmods.net/showpos...9&postcount=57 (thanks blue zebra!)

Support

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.

Thanks

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.

Changes

1.0
- Initial public release.

1.1
- 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.

1.1.1
- Fixed a small memory leak.

1.1.2
- Added support to clean up sprays.

1.1.3
- 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.

1.1.4
- Fixed issue if you installed the plugin on a fresh server it would complain about the downloads directory being missing.

1.1.5
- Removed warnings about directories, only confuses users.

1.1.6
- Fixed return on "clean now" command.
- Removed an old check for the spray folder.

1.1.7
- Added WarMod support.

1.1.8
- 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.

1.1.9
- Fixed round backup clean up for csgo to use the proper cvar for setting the round backup file name prefix, thanks SanKen!

1.2.0
- Added support for replay cleaning and steampipe spray cleaning.
- Added cvar to control whether to check for archives too when cleaning replays.

1.2.1
- 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.

1.2.2
- Fixed memory leaks and optimised some code (thanks 11530!)
Attached Files
File Type: cfg plugin.servercleanup.cfg (3.3 KB, 2636 views)
File Type: sp Get Plugin or Get Source (servercleanup.sp - 4583 views - 16.1 KB)
File Type: txt servercleanup.phrases.txt (3.0 KB, 2251 views)

Last edited by Jamster; 03-22-2018 at 17:01. Reason: Updated post to reflect fixed version
Jamster is offline