CardsAgainstIRC3.Game.States.Base.LeaveCommand C# (CSharp) Method

LeaveCommand() private method

private LeaveCommand ( CommandContext context, IEnumerable arguments ) : void
context CommandContext
arguments IEnumerable
return void
        public void LeaveCommand(CommandContext context, IEnumerable<string> arguments)
        {
            var player = Manager.Resolve(context.Nick);
            if (player == null)
                return;

            if (UserLeft(player, true))
            {
                Manager.UserQuit(context.Nick);
                Manager.SendPublic(context.Nick, "You left{0}!", player.JoinReason);
            }
            else
            {
                player.WantsToLeave = true;
                Manager.SendPublic(player, "You will leave{0} once this round ends!", player.JoinReason);
            }
        }