MineViewer.SMPInterface.AuthConnect C# (CSharp) Méthode

AuthConnect() public static méthode

public static AuthConnect ( string _Username, string _ServerID ) : bool
_Username string
_ServerID string
Résultat bool
        public static bool AuthConnect(string _Username, string _ServerID)
        {
            string returns = "";
            try
            {
                PostData post = new PostData("http://www.minecraft.net/game/joinserver.jsp");
                post.Add("user", _Username);
                post.Add("sessionId", SessionID);
                post.Add("serverId", _ServerID);
                returns = post.GetResult(true);
            }
            catch { SMPInterface.LastError = "Could not connect to minecraft.net"; return false; }

            SMPInterface.Debug("Connect Authecation: " + returns + "\n");

            if (returns == "OK")
                return true;
            else
                return false;
        }