From 47120db47c193cee01c712d00f9a0bead8be751a Mon Sep 17 00:00:00 2001 From: Bitl Date: Fri, 1 Sep 2017 06:17:25 -0700 Subject: [PATCH] upnp --- RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs index ebeea6d..3bf8781 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs @@ -108,12 +108,15 @@ namespace RBXLegacyLauncher void Button2Click(object sender, EventArgs e) { - Process pmap = new Process(); - pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\jreportable\\bin\\java.exe"; - pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"localhost\" -protocol udp"; - pmap.StartInfo.UseShellExecute = false; - pmap.StartInfo.CreateNoWindow = true; - pmap.Start(); + if (GlobalVars.upnp == true) + { + Process pmap = new Process(); + pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\jreportable\\bin\\java.exe"; + pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"localhost\" -protocol udp"; + pmap.StartInfo.UseShellExecute = false; + pmap.StartInfo.CreateNoWindow = true; + pmap.Start(); + } WriteConfigValues(); StartServer();