diff --git a/Patches/ClientPatch.cs b/Patches/ClientPatch.cs index c8c08c7..f1b4d9e 100644 --- a/Patches/ClientPatch.cs +++ b/Patches/ClientPatch.cs @@ -17,6 +17,24 @@ public class ClientPatch Logger.Log($"Client has left game for: {Enum.GetName(reason)}", "AmongUsClientPatch"); } } + [HarmonyPatch(typeof(InnerNetClient))] + public class InnerNetClientPatch + { + [HarmonyPatch(nameof(InnerNetClient.CanBan))] + [HarmonyPrefix] + public static bool CanBan_Prefix(ref bool __result) + { + __result = GameStates.IsHost; + return false; + } + [HarmonyPatch(nameof(InnerNetClient.CanKick))] + [HarmonyPrefix] + public static bool CanKick_Prefix(ref bool __result) + { + __result = GameStates.IsHost; + return false; + } + } // Set text color [HarmonyPatch(typeof(CosmeticsLayer))] public class CosmeticsLayerPatch