mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-19 15:51:59 +00:00
18 lines
588 B
C#
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;
|
|
}
|
|
} |