public bool JoinGame(bool automatch, string gameName, string address, int port, string hostname, string commandargs)
 {
     this.mHostName = hostname;
     this.mGameName = gameName.Replace(@"\\'", "'").Replace("\\\\\"", "\"");
     string arguements = commandargs + " " + GameArgs;
     if (this.DoReplay)
     {
         this.mReplayID = Guid.NewGuid().ToString();
         string str2 = User.Current.Name + "." + gameName.Replace(" ", "_.scrply");
         arguements = arguements + " /savereplay " + this.GPGNetURL + str2;
         ThreadQueue.Quazal.Enqueue(typeof(DataAccess), "ExecuteQuery", null, null, new object[] { "ReplayJoined", new object[] { User.Current.ID, str2, this.mReplayID } });
     }
     if (User.GetProtocol() != null)
     {
         User.GetProtocol().RegisterUDPConnection();
     }
     this.mSupcomTCPConnection = new SupcomTCPConnection(automatch, this.GetGameLocation(), arguements, "localhost", 0, false, false);
     this.mSupcomTCPConnection.OnGetCommand += new EventHandler<Driver.InputEventArgs>(this.mSupcomTCPConnection_OnGetCommand);
     this.mSupcomTCPConnection.Bind(this.Port, User.Current.ID);
     this.mSupcomTCPConnection.OnExit += new EventHandler(this.mSupcomTCPConnection_OnExit);
     this.mTrafficManager.SetConnection(this.mSupcomTCPConnection);
     this.RegisterPrivateURL();
     this.SetUpAddressPoll();
     return true;
 }
 public bool WatchReplay(string commandargs, string url)
 {
     string arguements = GameArgs + " " + commandargs + " /replay " + url;
     this.mSupcomTCPConnection = new SupcomTCPConnection(false, this.GetGameLocation(), arguements, "localhost", 0, true, true);
     this.mSupcomTCPConnection.OnGetCommand += new EventHandler<Driver.InputEventArgs>(this.mSupcomTCPConnection_OnGetCommand);
     this.mSupcomTCPConnection.Bind(this.Port, User.Current.ID);
     this.mTrafficManager.SetConnection(this.mSupcomTCPConnection);
     return true;
 }