Idea by DarthNinja
This is basically the same as
[TF2] Http Replay Cleaner, it cleans up your remote replay store by deleting stale data.
Difference
This plugin is using the
cURL extension to delete files directly from the FTP rather than via remote php script.
Be sure to have that installed for running as well as compiling.
Configuration:
sm_treplaycleanupcurl_enable 1, Automatically cleanup on mapstart
sm_treplaycleanupcurl_daystokeep 14, Delete replay files older than 14 days
Expiration date
There is already an command
replay_docleanup and cvars
replay_dofileserver_cleanup_on_start and
replay_fileserver_autocleanup, but none of them do anything. Yet. Valve will probably add functionality to them making this plugin obsolete.
Nonetheless it could help as an additional example on how to use ftp with the curl extension.
Credits:
DarthNinja for the idea.
raydan for the cURL extension.