Esempio n. 1
0
        public void Kick(Guid serverId, int playerNum, string playerGuid, string reason, bool isAuto = false)
        {
            var totalreason =
                $"[{SettingsStore.Instance.AdminName}][{DateTime.UtcNow.ToString("dd.MM.yy HH:mm:ss")}] {reason}";

            SendCommand(serverId, CommandType.Kick,
                        $"{playerNum} {totalreason}");

            if (!isAuto)
            {
                var user = _playerRepository.GetPlayer(playerGuid);
                if (user != null)
                {
                    _playerRepository.AddNotes(user.Id, $"Kicked with reason: {totalreason}");
                    user.Comment = $"{user.Comment} | {reason}";
                    _playerRepository.UpdatePlayerComment(user.GUID, user.Comment);
                }
            }
        }
Esempio n. 2
0
 public void AddNotes(Guid id, string s)
 {
     _playerRepository.AddNotes(id, s);
 }