Added logging for security audits.

This commit is contained in:
AlgorithmX2
2014-09-04 22:08:07 -05:00
parent b86e728f04
commit b8d0db995b
3 changed files with 17 additions and 1 deletions
+11
View File
@@ -11,6 +11,9 @@ import appeng.api.networking.IGridNode;
import appeng.api.networking.events.MENetworkChannelsChanged;
import appeng.api.networking.pathing.IPathingGrid;
import appeng.api.util.IReadOnlyCollection;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.features.AEFeature;
import appeng.me.pathfinding.IPathItem;
import appeng.util.Platform;
import appeng.util.ReadOnlyCollection;
@@ -34,7 +37,15 @@ public class GridConnection implements IGridConnection, IPathItem
GridNode b = (GridNode) bNode;
if ( Platform.securityCheck( a, b ) )
{
if ( AEConfig.instance.isFeatureEnabled( AEFeature.LogSecurityAudits ) )
{
AELog.info( "Audit Failed 1: " + a.getGridBlock().getLocation() );
AELog.info( "Audit Failed 2: " + b.getGridBlock().getLocation() );
}
throw new FailedConnection();
}
if ( a == null || b == null )
throw new GridException( "Connection Forged Between null enties." );