Merge pull request #956 from yueh/feature-improve-security-audit-log
Added some more information to the security audit
This commit is contained in:
@@ -30,6 +30,7 @@ import appeng.api.networking.IGridConnection;
|
|||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||||
import appeng.api.networking.pathing.IPathingGrid;
|
import appeng.api.networking.pathing.IPathingGrid;
|
||||||
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.api.util.IReadOnlyCollection;
|
import appeng.api.util.IReadOnlyCollection;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
@@ -38,6 +39,7 @@ import appeng.me.pathfinding.IPathItem;
|
|||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.ReadOnlyCollection;
|
import appeng.util.ReadOnlyCollection;
|
||||||
|
|
||||||
|
|
||||||
public class GridConnection implements IGridConnection, IPathItem
|
public class GridConnection implements IGridConnection, IPathItem
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -51,7 +53,8 @@ public class GridConnection implements IGridConnection, IPathItem
|
|||||||
|
|
||||||
public int channelData = 0;
|
public int channelData = 0;
|
||||||
|
|
||||||
public GridConnection(IGridNode aNode, IGridNode bNode, ForgeDirection fromAtoB) throws FailedConnection {
|
public GridConnection( IGridNode aNode, IGridNode bNode, ForgeDirection fromAtoB ) throws FailedConnection
|
||||||
|
{
|
||||||
|
|
||||||
GridNode a = ( GridNode ) aNode;
|
GridNode a = ( GridNode ) aNode;
|
||||||
GridNode b = ( GridNode ) bNode;
|
GridNode b = ( GridNode ) bNode;
|
||||||
@@ -60,8 +63,11 @@ public class GridConnection implements IGridConnection, IPathItem
|
|||||||
{
|
{
|
||||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.LogSecurityAudits ) )
|
if ( AEConfig.instance.isFeatureEnabled( AEFeature.LogSecurityAudits ) )
|
||||||
{
|
{
|
||||||
AELog.info( "Audit Failed 1: " + a.getGridBlock().getLocation() );
|
final DimensionalCoord aCoordinates = a.getGridBlock().getLocation();
|
||||||
AELog.info( "Audit Failed 2: " + b.getGridBlock().getLocation() );
|
final DimensionalCoord bCoordinates = b.getGridBlock().getLocation();
|
||||||
|
|
||||||
|
AELog.info( "Security audit 1 failed at [x=%d, y=%d, z=%d] belonging to player [id=%d]", aCoordinates.x, aCoordinates.y, aCoordinates.z, a.playerID );
|
||||||
|
AELog.info( "Security audit 2 failed at [x=%d, y=%d, z=%d] belonging to player [id=%d]", bCoordinates.x, bCoordinates.y, bCoordinates.z, b.playerID );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new FailedConnection();
|
throw new FailedConnection();
|
||||||
|
|||||||
Reference in New Issue
Block a user