mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
fix report name
This commit is contained in:
1 parent
6eaf2ab53f
commit
169ca95da3
3 files changed
+30
-4
No files matched your search
@@ -25,15 +25,15 @@ class AntiCheat
|
||||
|
||||
if (SickoData.ContainsKey(hashPuid))
|
||||
{
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> Has been banned by <color=#4f92ff>Anti-Cheat</color>, Reason: <color=#00f583>Known Sicko Menu User</color>");
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> banned by <color=#4f92ff>Anti-Cheat</color>!\n Reason: <color=#00f583>Known Sicko Menu User</color>");
|
||||
}
|
||||
else if (AUMData.ContainsKey(hashPuid))
|
||||
{
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> Has been banned by <color=#4f92ff>Anti-Cheat</color>, Reason: <color=#4f0000>Known AUM User</color>");
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> banned by <color=#4f92ff>Anti-Cheat</color>!\n Reason: <color=#4f0000>Known AUM User</color>");
|
||||
}
|
||||
else if (PlayerData.ContainsKey(hashPuid))
|
||||
{
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> Has been banned by <color=#4f92ff>Anti-Cheat</color>, Reason: <color=#fc0000>Known Cheater</color>");
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> banned by <color=#4f92ff>Anti-Cheat</color>!\n Reason: <color=#fc0000>Known Cheater</color>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,8 @@ class AntiCheat
|
||||
[HarmonyPostfix]
|
||||
public static void Deserialize_Postfix(PlatformSpecificData __instance)
|
||||
{
|
||||
if (!Main.AntiCheat.Value) return;
|
||||
|
||||
if (GameStates.IsLobby)
|
||||
{
|
||||
_ = new LateTask(() =>
|
||||
|
||||
@@ -48,7 +48,7 @@ class BetterNotificationManager
|
||||
|
||||
if (GameStates.IsHost && kickPlayer)
|
||||
{
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> Has been banned by <color=#4f92ff>Anti-Cheat</color>, Reason: <color=#fc0000>{reason}</color>");
|
||||
player.Kick(true, $"<color=#ffea00>{player.Data.PlayerName}</color> banned by <color=#4f92ff>Anti-Cheat</color>!\n Reason: <color=#fc0000>{reason}</color>");
|
||||
}
|
||||
|
||||
Logger.LogCheat(Utils.GetRawText(text));
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(ReportReasonScreen))]
|
||||
class ReportReasonScreenPatch
|
||||
{
|
||||
[HarmonyPatch(nameof(ReportReasonScreen.Show))]
|
||||
[HarmonyPrefix]
|
||||
public static void Show_Prefix(ref string playerName)
|
||||
{
|
||||
if (playerName.Contains("Anti-Cheat"))
|
||||
{
|
||||
string extractedText = playerName.Split(new[] { "<color=#ffea00>", "</color>" }, StringSplitOptions.None)[1];
|
||||
playerName = extractedText;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user