AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Server Clean Up (1.2.2) (https://forums.alliedmods.net/showthread.php?t=112651)

Jamster 12-20-2009 10:55

Server Clean Up (1.2.2)
 
28 Attachment(s)
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!)

zeroibis 01-02-2010 11:20

Re: Server Clean Up
 
I will be testing this out:mrgreen:

bouncer 01-02-2010 18:10

Re: Server Clean Up
 
Will be testing this as well, this is something that should have been created a long time ago, rather more, should be a sourcemod settings by default!
Hopefully I wont forget to check if it actually works lol.

Jamster 01-02-2010 19:28

Re: Server Clean Up
 
Thanks guys.

btw, anyone that has their server archive their demos every day it will go by the date when the archive is created not the date of the demo itself. It makes sense from a file access point of view but "looking" at the dates in the filename it won't, of course, heh.

Jamster 01-24-2010 17:38

Re: Server Clean Up
 
Update posted.

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.

rambomst 01-24-2010 17:53

Re: Server Clean Up
 
I just tested it on SM 1.3.0 and MM 1.8.0 and it works wonders <3 I love this plugin. One question tho is this meant to delete logs out of /cstrike/logs/ folder?

Jamster 01-24-2010 17:56

Re: Server Clean Up
 
Well, depends on how you have it setup but yes, that's what it does.

It deletes logs from <game>/logs (or whatever sv_logsdir is set to) and <sourcemod>/logs

Also, thanks!

rambomst 01-24-2010 18:00

Re: Server Clean Up
 
Nvm I thought it wasn't deleting the logs out of cstrike/logs but I neglected to look at the dates of them there is just so many I thought they were a few weeks old but they aren't they aren't. Its doing its job.

Jamster 01-24-2010 18:11

Re: Server Clean Up
 
Yeah, your average server is gonna have a ton of logs just for a few days even, hah.

saint555 01-25-2010 03:12

Re: Server Clean Up
 
Hi!
This script clean up the ../cstrike/downloads map? (the sprays)
Br.: saint


All times are GMT -4. The time now is 10:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.