public override void OnInit() { //Initialise the raid manager RaidManager.Initialise(); //Load raid config this.raidConfig = RaidConfig.ReadConfig(); //Create a timer to periodically clean up old raids Timer t = new Timer(60 * 60 * 1000); t.Elapsed += (s, e) => { //Delete raids older than 5 hours RaidManager.CleanRaidFiles(new TimeSpan(5, 0, 0)); }; t.AutoReset = true; t.Start(); }