コード例 #1
0
 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));
     }
 }
コード例 #2
0
 public RustPlayerAntiHackViolationEvent(
     RustPlayer player,
     AntiHackType antiHackType,
     float amount) : base(player)
 {
     AntiHackType = antiHackType;
     Amount       = amount;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
        object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount)
        {
            if (IsInvisible(player))
            {
                return(false);
            }

            return(null);
        }
コード例 #6
0
 object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount)
 {
     if (player == null)
     {
         return(null);
     }
     if (carpetantihack.Contains(player))
     {
         return(false);
     }
     return(null);
 }
コード例 #7
0
 private object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount)
 {
     if (player == null)
     {
         return(null);
     }
     if (ListConstainsPlayerID(player))
     {
         return(true);
     }
     return(null);
 }
コード例 #8
0
 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);
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 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);
     }
 }
コード例 #11
0
        private object?OnPlayerViolation(BasePlayer player, AntiHackType type, float amount)
        {
            var @event = new RustPlayerAntiHackViolationEvent(new RustPlayer(player), type, amount);

            return(EmitCancellableReturnsObject(@event));
        }
コード例 #12
0
 private static void LogToConsole(BasePlayer ply, AntiHackType type, string message)
 {
     Debug.LogWarning(string.Concat(new object[] { ply, " ", type, ": ", message }));
 }
コード例 #13
0
 private static void LogToConsole(BasePlayer ply, AntiHackType type, string message)
 {
     Debug.LogWarning((object)(ply.ToString() + " " + (object)type + ": " + message));
 }