private static void KickPlayer(ClientInfo _cInfo)
{
string _phrase1;
string _phrase2;
if (!Phrases.Dict.TryGetValue(1, out _phrase1))
{
_phrase1 = "Auto Kicking {PlayerName} for high ping. ({PlayerPing}) Maxping is {MaxPing}.";
}
if (!Phrases.Dict.TryGetValue(2, out _phrase2))
{
_phrase2 = "Auto Kicked: Ping To High. ({PlayerPing}) Max Ping is {MaxPing}.";
}
_phrase1 = _phrase1.Replace("{PlayerName}", _cInfo.playerName);
_phrase1 = _phrase1.Replace("{PlayerPing}", _cInfo.ping.ToString());
_phrase1 = _phrase1.Replace("{MaxPing}", MAXPING.ToString());
_phrase2 = _phrase2.Replace("{PlayerPing}", _cInfo.ping.ToString());
_phrase2 = _phrase2.Replace("{MaxPing}", MAXPING.ToString());
Log.Out(string.Format("[SERVERTOOLS] {0}", _phrase1));
GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("[FF8000]{0}[-]", _phrase1), "Server", false, "", false);
SdtdConsole.Instance.ExecuteSync(string.Format("Kick {0} \"{1}\"", _cInfo.entityId, _phrase2), _cInfo);
}