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

JoinCommand() private method

private JoinCommand ( CommandContext context, IEnumerable arguments ) : void
context CommandContext
arguments IEnumerable
return void
        public void JoinCommand(CommandContext context, IEnumerable<string> arguments)
        {
            GameUser player = Manager.Resolve(context.Nick);
            if (player == null)
            {
                player = Manager.UserAdd(context.Nick);
                player.CanChooseCards = player.CanVote = true;
                Manager.UpdateCzars();
            }

            if (arguments.Count() > 0)
                player.JoinReason = " " + string.Join(" ", arguments);
            Manager.SendPublic(context.Nick, "You joined{0}!", player.JoinReason);
        }