Does anybody knows a plugin that automaatically delete old logs? I am talking about sourcemod-logs and the normal csgo-logs.
Thanks for any help.
Husker
10-19-2016 16:34
Re: Plugin that automaatically delete old logs?
No need for such a plugin, just make a script that deletes old log files (theres plenty of examples of such scripts in the interwebz).
headline
10-19-2016 19:55
Re: Plugin that automaatically delete old logs?
1 Attachment(s)
This is more of a plugin request so it should be moved there, but this should work :D
It automatically deletes files that are older than a week. If you want to increment the time change this line. It's in weeks
Code:
#define WEEKS_TO_DELETE 1
As usual, SourceMod 1.7+
Spoiler
PHP Code:
#include <sourcemod> #include <sdktools>
#pragma semicolon 1 #pragma newdecls required
#define WEEKS_TO_DELETE 1
ArrayList filesToDelete;
public Plugin myinfo = { name = "[ANY] Sourcemod Log Deleter", author = "Headline, SWAT_88", description = "Deletes logs when they reach a certain age", version = "1.0.1", url = "colosseum-gaming.com" }
public void OnMapStart() { char path[PLATFORM_MAX_PATH], sTempString[128]; int count;