Quote:
Originally Posted by Obyboby
Hello, is there a way to set a clean up frequency of like 1 or 2 hours? I really need to save demos but I want them to be stored for like an hour or so.
How do I edit the source?
Thanks for any help
The minimum amount of hours possible as of now is 12, I just need to edit the source to make it 1 instead of 12. Should be ez right?
I also need some help with the demos deletion:
My GOTV is saving them into /csgo/.
Is that the default folder? Do I need to specify it in the CFG? If yes, what do I write there? /server/csgo/ or /csgo/ or / ?
|
Could someone please confirm the part in bold..?
Console output:
PHP Code:
"sm_srvcln_demos_path" = "./" ( def. "./demos" ) - Optional directory path to your demo files if you are manually saving them elsew
L 03/13/2018 - 18:19:20: rcon from "xxxxxx": command "sm_srvcln_demos_path"
The demos are not being deleted so I guess it's either the wrong folder or the change I've made to the source code does not work. (I tried to reduce the minimum clean up frequency to one hour because I can't keep demos for 12 hours, it would fill the server space).
Hopefully someone is willing to help me out
EDIT:
Read the whole thread for the second time and found the answer:
Quote:
Originally Posted by Sketchy
Can you gimme an example of what sm_srvcln_demos_path should be if i want to clean up sourcetv demo files that are being saved at ../cstrike/addons/sourcemod/recordings/ (and on GO ../csgo/addons/sourcemod/recordings/) cause I cant seem to get that 1 setting correct.
|
Quote:
Originally Posted by Jamster
oh, it's without the game folder so e.g. /addons/sourcemod/recordings/
|
That means that the workaround I've tried in order to reduce the minimum demos clean up frequency to 1 instead of 12, didn't work.
Basically I was trying to remove the 12 hours check in order to trick the plugin and allow me to set a frequency of one hour to clean demos.
The old lines of code:
PHP Code:
{
int Time32;
int TimeType = GetConVarInt(cvar_time[type]);
if (TimeType != -1)
{
if (TimeType <= 1)
{
Time32 = GetTime() / 3600 - 1;
TimeType = 1;
}
else
{
Time32 = GetTime() / 3600 - TimeType;
}
}
New lines of code:
PHP Code:
{
int Time32;
int TimeType = GetConVarInt(cvar_time[type]);
if (TimeType != -1)
{
Time32 = GetTime() / 3600 - TimeType;
}
I'm pretty noob at coding and asked a friend for some help and he suggested that, but we weren't sure it would help.
Some input would be greatly appreciated <3
EDIT2:
I decided to revert the plugin to the last known working version which should be
this one because I began to suspect that it wasn't deleting the demos regardless, I mean, it looks like it's not deleting them at all.
I have now installed
another plugin that allowed me to set a custom folder for the recorded demos, so I was able to set "./demos" as the GOTV default folder.
I then reverted the setting for Server clean up to make it point to the same directory to clean up demos.
The CFG is as follows:
PHP Code:
// This file was auto-generated by SourceMod (v1.8.0.6041)
// ConVars for plugin "servercleanup.smx"
// Clean up automatically recorded demo files.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_demos "1"
// Include archives when deleting old demos (if your server automatically compresses them, detects: bz2, zip, rar and 7z).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_demos_archives "1"
// Optional directory path to your demo files if you are manually saving them elsewhere.
// -
// Default: "./demos"
sm_srvcln_demos_path "./demos"
// Time (in hours) to keep demo files (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_demos_time "12"
// Enable automatic server clean up (1 - enable, 0 - disable, manual clean up command only).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_enable "1"
// Log what Server Clean Up deletes.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_logging_mode "1"
// Clean up regular server logs.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_logs "1"
// Time (in hours) to keep regular server logs (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_logs_time "48"
// Clean up generated replay files.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_replays "1"
// Include archives when deleting old replays (if your server automatically compresses them, detects: bz2, zip, rar and 7z).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_replays_archives "1"
// Time (in hours) to keep generated replay files (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_replays_time "48"
// Clean up CS:GO round backup files (note: only if none of the naming options have been changed from default settings for round backups).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_roundbackups "1"
// Time (in hours) to keep round backup's in CS:GO (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_roundbackups_time "48"
// Clean up SourceMod server logs.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_smlogs "1"
// Time (in hours) to keep SourceMod server logs (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_smlogs_time "48"
// What type of logs to delete from the SM logs folder (0 - just normal logs, 1 - normal logs and error logs, 2 - all logs).
// -
// Default: "2"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_srvcln_smlogs_type "2"
// Clean up uploaded sprays.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_srvcln_sprays "1"
// Time (in hours) to keep uploaded sprays (default is one week, minimum value is 12 hours, set to -1 to keep current day only).
// -
// Default: "168"
// Minimum: "-1.000000"
sm_srvcln_sprays_time "48"
Does the "sm_srvcln_now" command delete demos as well, or just logs?
Since the minimum cleanup frequency for the demos is now 12 hours again, I can't really wait 12 hours and fill my server with demos before I can see if it actually works. So I was hoping the manual clean up deleted demos as well but it didn't really work.. Unless i got it wrong and the manual command still follows the frequency rule set in the CFG?
I thought it would override the time settings and just clean everything in the various folders..
__________________