This repository was archived by the owner on Jun 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
EssentialsPlugin/ProcessHandlers Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 22{
33 using System ;
44 using System . Collections . Generic ;
5+ using System . Linq ;
56 using EssentialsPlugin . Settings ;
67 using EssentialsPlugin . Utility ;
78 using Sandbox . ModAPI ;
@@ -28,23 +29,17 @@ public override void Handle( )
2829 if ( ! PluginSettings . Instance . CleanupEnabled )
2930 return ;
3031
31- foreach ( SettingsCleanupTimedItem item in PluginSettings . Instance . CleanupTimedItems )
32+ foreach ( SettingsCleanupTimedItem item in PluginSettings . Instance . CleanupTimedItems . Where ( item => item . Enabled ) )
3233 {
33- if ( ! item . Enabled )
34- continue ;
35-
3634 ProcessTimedItem ( item ) ;
3735 }
3836
39- foreach ( SettingsCleanupTriggerItem item in PluginSettings . Instance . CleanupTriggerItems )
37+ foreach ( SettingsCleanupTriggerItem item in PluginSettings . Instance . CleanupTriggerItems . Where ( item => item . Enabled ) )
4038 {
41- if ( ! item . Enabled )
42- continue ;
43-
4439 ProcessTriggerItem ( item ) ;
4540 }
4641 }
47- catch ( Exception ex )
42+ catch ( OverflowException ex )
4843 {
4944 Logging . WriteLineAndConsole ( string . Format ( "ProcessCleanup.Handle(): {0}" , ex ) ) ;
5045 }
You can’t perform that action at this time.
0 commit comments