newLogin() публичный Метод

public newLogin ( string username, string password ) : string[]
username string
password string
Результат string[]
Пример #1
0
        public void beginConnect(string IP, string port, string UN, string PW, bool online)
        {
            lstOnline.Items.Clear();
            username   = UN;
            onlineMode = online;
            sip        = IP;
            sport      = port;

            if (online && sessionId == null)
            {
                puts("Logging in to Minecraft.net...");

                Minecraft_Net_Interaction Login = new Minecraft_Net_Interaction();

                // string Response = Login.Login(UN, PW);
                string[] response = Login.newLogin(UN, PW);

                if (response[0] != "")
                {
                    sessionId = "token:" + response[0] + ":" + response[1];
                }
                else
                {
                    if (sessionId != null)
                    {
                        puts("Error logging in to Minecraft.net!");
                        puts(response.ToString());
                    }
                    else
                    {
                        puts("Attempting to log in with old credentials..");
                    }
                }
            }
            else
            {
                sessionId = "epicw1n";
            }

            //Begin connection to server.
            nh = new networkHandler(IP, port, this);
            nh.start();
        }