Files
AmongUsRevamped/Patches/KickPlayerPatch.cs
T
Ape 9d20bdfb95 Transfer HNSR -> AUR
Time to pray to God this all goes well!
2025-12-17 16:08:45 +01:00

18 lines
588 B
C#

using InnerNet;
using UnityEngine;
// https://github.com/tukasa0001/TownOfHost/blob/main/Patches/ClientPatch.cs
namespace AmongUsRevamped;
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.KickPlayer))]
internal class KickPlayerPatch
{
public static Dictionary<string, int> AttemptedKickPlayerList = [];
public static bool Prefix(InnerNetClient __instance, int clientId, bool ban)
{
if (!AmongUsClient.Instance.AmHost) return true;
if (ban) BanManager.AddBanPlayer(AmongUsClient.Instance.GetRecentClient(clientId));
return true;
}
}