portmapper stuff
This commit is contained in:
parent
85a8a7fce0
commit
ff9b9f2466
|
|
@ -18,7 +18,6 @@
|
||||||
public static int ServerPort = 53640;
|
public static int ServerPort = 53640;
|
||||||
public static int DefaultRobloxPort = 53640;
|
public static int DefaultRobloxPort = 53640;
|
||||||
public static int PlayerLimit = 12;
|
public static int PlayerLimit = 12;
|
||||||
public static string MyIP = "localhost";
|
|
||||||
// player settings
|
// player settings
|
||||||
public static int UserID = 0;
|
public static int UserID = 0;
|
||||||
public static string PlayerName = "Player";
|
public static string PlayerName = "Player";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ using System.Reflection;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Net;
|
|
||||||
|
|
||||||
namespace RBXLegacyLauncher
|
namespace RBXLegacyLauncher
|
||||||
{
|
{
|
||||||
|
|
@ -110,8 +109,8 @@ namespace RBXLegacyLauncher
|
||||||
void Button2Click(object sender, EventArgs e)
|
void Button2Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Process pmap = new Process();
|
Process pmap = new Process();
|
||||||
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Java -jar portmapper.jar";
|
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\bin\\java.exe";
|
||||||
pmap.StartInfo.Arguments = "-add -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip" + GlobalVars.MyIP + " -protocol udp";
|
pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"\localhost\" -protocol udp";
|
||||||
pmap.StartInfo.UseShellExecute = false;
|
pmap.StartInfo.UseShellExecute = false;
|
||||||
pmap.StartInfo.CreateNoWindow = true;
|
pmap.StartInfo.CreateNoWindow = true;
|
||||||
pmap.Start();
|
pmap.Start();
|
||||||
|
|
@ -190,17 +189,6 @@ namespace RBXLegacyLauncher
|
||||||
label11.Text = version;
|
label11.Text = version;
|
||||||
GlobalVars.Version = version;
|
GlobalVars.Version = version;
|
||||||
ReadConfigValues();
|
ReadConfigValues();
|
||||||
using (WebClient wc = new WebClient())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
GlobalVars.MyIP = wc.DownloadString("http://ipv4.icanhazip.com");
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
GlobalVars.MyIP = "localhost" + Environment.NewLine;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadConfigValues()
|
void ReadConfigValues()
|
||||||
|
|
@ -890,8 +878,8 @@ namespace RBXLegacyLauncher
|
||||||
if (command.Equals("rbxlegacy server"))
|
if (command.Equals("rbxlegacy server"))
|
||||||
{
|
{
|
||||||
Process pmap = new Process();
|
Process pmap = new Process();
|
||||||
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Java -jar portmapper.jar";
|
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\bin\\java.exe";
|
||||||
pmap.StartInfo.Arguments = "-add -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip" + GlobalVars.MyIP + " -protocol udp";
|
pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"\localhost\" -protocol udp";
|
||||||
pmap.StartInfo.UseShellExecute = false;
|
pmap.StartInfo.UseShellExecute = false;
|
||||||
pmap.StartInfo.CreateNoWindow = true;
|
pmap.StartInfo.CreateNoWindow = true;
|
||||||
pmap.Start();
|
pmap.Start();
|
||||||
|
|
@ -900,8 +888,8 @@ namespace RBXLegacyLauncher
|
||||||
else if (command.Equals("rbxlegacy server no3d"))
|
else if (command.Equals("rbxlegacy server no3d"))
|
||||||
{
|
{
|
||||||
Process pmap = new Process();
|
Process pmap = new Process();
|
||||||
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Java -jar portmapper.jar";
|
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\bin\\java.exe";
|
||||||
pmap.StartInfo.Arguments = "-add -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip" + GlobalVars.MyIP + " -protocol udp";
|
pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"\localhost\" -protocol udp";
|
||||||
pmap.StartInfo.UseShellExecute = false;
|
pmap.StartInfo.UseShellExecute = false;
|
||||||
pmap.StartInfo.CreateNoWindow = true;
|
pmap.StartInfo.CreateNoWindow = true;
|
||||||
pmap.Start();
|
pmap.Start();
|
||||||
|
|
@ -910,8 +898,8 @@ namespace RBXLegacyLauncher
|
||||||
else if (command.Equals("rbxlegacy no3d"))
|
else if (command.Equals("rbxlegacy no3d"))
|
||||||
{
|
{
|
||||||
Process pmap = new Process();
|
Process pmap = new Process();
|
||||||
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Java -jar portmapper.jar";
|
pmap.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\bin\\java.exe";
|
||||||
pmap.StartInfo.Arguments = "-add -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip" + GlobalVars.MyIP + " -protocol udp";
|
pmap.StartInfo.Arguments = "-jar upnp.jar -externalPort" + GlobalVars.ServerPort + " -internalPort" + GlobalVars.ServerPort + "-ip \"\localhost\" -protocol udp";
|
||||||
pmap.StartInfo.UseShellExecute = false;
|
pmap.StartInfo.UseShellExecute = false;
|
||||||
pmap.StartInfo.CreateNoWindow = true;
|
pmap.StartInfo.CreateNoWindow = true;
|
||||||
pmap.Start();
|
pmap.Start();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue