private static void LogToEAC(BasePlayer ply, AntiHackType type, string message) { if (ConVar.AntiHack.reporting && EACServer.eacScout != null) { EACServer.eacScout.SendInvalidPlayerStateReport(ply.UserIDString, InvalidPlayerStateReportCategory.PlayerReportExploiting, string.Concat(type, ": ", message)); } }
public RustPlayerAntiHackViolationEvent( RustPlayer player, AntiHackType antiHackType, float amount) : base(player) { AntiHackType = antiHackType; Amount = amount; }
public static void Log(BasePlayer ply, AntiHackType type, string message) { if (ConVar.AntiHack.debuglevel > 1) { AntiHack.LogToConsole(ply, type, message); } AntiHack.LogToEAC(ply, type, message); }
private static void LogToEAC(BasePlayer ply, AntiHackType type, string message) { if (!ConVar.AntiHack.reporting || EACServer.eacScout == null) { return; } EACServer.eacScout.SendInvalidPlayerStateReport(ply.UserIDString, (InvalidPlayerStateReportCategory)2, ((int)type).ToString() + ": " + message); }
object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount) { if (IsInvisible(player)) { return(false); } return(null); }
object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount) { if (player == null) { return(null); } if (carpetantihack.Contains(player)) { return(false); } return(null); }
private object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount) { if (player == null) { return(null); } if (ListConstainsPlayerID(player)) { return(true); } return(null); }
public static void AddViolation(BasePlayer ply, AntiHackType type, float amount) { if (Interface.CallHook("OnPlayerViolation", ply, type, amount) != null) { return; } ply.lastViolationType = type; ply.lastViolationTime = UnityEngine.Time.realtimeSinceStartup; ply.violationLevel += amount; if (ConVar.AntiHack.debuglevel >= 2 && amount > 0f || ConVar.AntiHack.debuglevel >= 3) { AntiHack.LogToConsole(ply, type, string.Concat(new object[] { "Added violation of ", amount, " in frame ", UnityEngine.Time.frameCount, " (now has ", ply.violationLevel, ")" })); } AntiHack.EnforceViolations(ply); }
public static void AddViolation(BasePlayer ply, AntiHackType type, float amount) { if (Interface.CallHook("OnPlayerViolation", (object)ply, (object)type, (object)amount) != null) { return; } ply.lastViolationType = type; ply.lastViolationTime = Time.get_realtimeSinceStartup(); ply.violationLevel += amount; if (ConVar.AntiHack.debuglevel >= 2 && (double)amount > 0.0 || ConVar.AntiHack.debuglevel >= 3) { AntiHack.LogToConsole(ply, type, "Added violation of " + (object)amount + " in frame " + (object)Time.get_frameCount() + " (now has " + (object)ply.violationLevel + ")"); } AntiHack.EnforceViolations(ply); }
public static void AddViolation(BasePlayer ply, AntiHackType type, float amount) { if (Interface.CallHook("OnPlayerViolation", ply, type, amount) != null) { return; } using (TimeWarning.New("AntiHack.AddViolation")) { ply.lastViolationType = type; ply.lastViolationTime = UnityEngine.Time.realtimeSinceStartup; ply.violationLevel += amount; if ((ConVar.AntiHack.debuglevel >= 2 && amount > 0f) || ConVar.AntiHack.debuglevel >= 3) { LogToConsole(ply, type, "Added violation of " + amount + " in frame " + UnityEngine.Time.frameCount + " (now has " + ply.violationLevel + ")"); } EnforceViolations(ply); } }
private object?OnPlayerViolation(BasePlayer player, AntiHackType type, float amount) { var @event = new RustPlayerAntiHackViolationEvent(new RustPlayer(player), type, amount); return(EmitCancellableReturnsObject(@event)); }
private static void LogToConsole(BasePlayer ply, AntiHackType type, string message) { Debug.LogWarning(string.Concat(new object[] { ply, " ", type, ": ", message })); }
private static void LogToConsole(BasePlayer ply, AntiHackType type, string message) { Debug.LogWarning((object)(ply.ToString() + " " + (object)type + ": " + message)); }