CEngineSharp_Server.World.Content_Managers.PlayerManager.AuthenticateLogin C# (CSharp) Method

AuthenticateLogin() private method

private AuthenticateLogin ( Player player ) : bool
player CEngineSharp_Server.World.Entities.Player
return bool
        private bool AuthenticateLogin(Player player)
        {
            var actualPlayer = this.LoadPlayer(Constants.FILEPATH_PLAYERS + player.Name);

            if (actualPlayer.Name == player.Name && actualPlayer.Password == player.Password)
            {
                // Alright, the player is a-okay; let's really load him in now, and pass on the connection from the 'temporary' player.
                actualPlayer.Connection = player.Connection;
                player = actualPlayer;

                return true;
            }

            return false;
        }