mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
Make N00BS Respect IP set in server.properties
This commit is contained in:
parent
6ba1fd181f
commit
2f7481519f
3 changed files with 16 additions and 17 deletions
|
@ -15,7 +15,7 @@
|
||||||
{
|
{
|
||||||
"Entry"
|
"Entry"
|
||||||
{
|
{
|
||||||
"MsmKey" = "8:_0A60FDE4B10F4534872956DB03BF83D8"
|
"MsmKey" = "8:_7686E608D62344A3B6FD5C91755693AA"
|
||||||
"OwnerKey" = "8:_UNDEFINED"
|
"OwnerKey" = "8:_UNDEFINED"
|
||||||
"MsmSig" = "8:_UNDEFINED"
|
"MsmSig" = "8:_UNDEFINED"
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
"Name" = "8:Microsoft Visual Studio"
|
"Name" = "8:Microsoft Visual Studio"
|
||||||
"ProductName" = "8:HISP-N00BS"
|
"ProductName" = "8:HISP-N00BS"
|
||||||
"ProductCode" = "8:{6415E694-470B-43CC-8D9A-5955EF0AD4B7}"
|
"ProductCode" = "8:{6415E694-470B-43CC-8D9A-5955EF0AD4B7}"
|
||||||
"PackageCode" = "8:{B37B11B8-2541-4D08-932B-C44869E4200B}"
|
"PackageCode" = "8:{7CE3E717-9AAB-415E-AD02-324C01F63ED7}"
|
||||||
"UpgradeCode" = "8:{FAD2FB5F-7B7C-4293-BF2D-09384146449E}"
|
"UpgradeCode" = "8:{FAD2FB5F-7B7C-4293-BF2D-09384146449E}"
|
||||||
"AspNetVersion" = "8:2.0.50727.0"
|
"AspNetVersion" = "8:2.0.50727.0"
|
||||||
"RestartWWWService" = "11:FALSE"
|
"RestartWWWService" = "11:FALSE"
|
||||||
|
@ -287,7 +287,7 @@
|
||||||
}
|
}
|
||||||
"Shortcut"
|
"Shortcut"
|
||||||
{
|
{
|
||||||
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_2F026FA8197A4CF5B7273B427AAFF9AA"
|
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_2D6B5B28608E4FE5BD5E9AE8F9799C42"
|
||||||
{
|
{
|
||||||
"Name" = "8:HISP-N00BS"
|
"Name" = "8:HISP-N00BS"
|
||||||
"Arguments" = "8:"
|
"Arguments" = "8:"
|
||||||
|
@ -295,13 +295,13 @@
|
||||||
"ShowCmd" = "3:1"
|
"ShowCmd" = "3:1"
|
||||||
"IconIndex" = "3:0"
|
"IconIndex" = "3:0"
|
||||||
"Transitive" = "11:FALSE"
|
"Transitive" = "11:FALSE"
|
||||||
"Target" = "8:_0A60FDE4B10F4534872956DB03BF83D8"
|
"Target" = "8:_7686E608D62344A3B6FD5C91755693AA"
|
||||||
"Folder" = "8:_3B89F894B58B4F149DD0DBE5EC931BA2"
|
"Folder" = "8:_3B89F894B58B4F149DD0DBE5EC931BA2"
|
||||||
"WorkingFolder" = "8:_E3419B32123541589220537FB1154298"
|
"WorkingFolder" = "8:_E3419B32123541589220537FB1154298"
|
||||||
"Icon" = "8:_C3608492E4D74B8683DE9CB3B3DE5D8A"
|
"Icon" = "8:_C3608492E4D74B8683DE9CB3B3DE5D8A"
|
||||||
"Feature" = "8:"
|
"Feature" = "8:"
|
||||||
}
|
}
|
||||||
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_B6866EE5025E414BA27D663484ABD2F3"
|
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_E1442F9672E44E8ABE7FF8CE91B674A0"
|
||||||
{
|
{
|
||||||
"Name" = "8:HISP-N00BS"
|
"Name" = "8:HISP-N00BS"
|
||||||
"Arguments" = "8:"
|
"Arguments" = "8:"
|
||||||
|
@ -309,7 +309,7 @@
|
||||||
"ShowCmd" = "3:1"
|
"ShowCmd" = "3:1"
|
||||||
"IconIndex" = "3:0"
|
"IconIndex" = "3:0"
|
||||||
"Transitive" = "11:FALSE"
|
"Transitive" = "11:FALSE"
|
||||||
"Target" = "8:_0A60FDE4B10F4534872956DB03BF83D8"
|
"Target" = "8:_7686E608D62344A3B6FD5C91755693AA"
|
||||||
"Folder" = "8:_2BED5EC5191147F4815904695DFB5319"
|
"Folder" = "8:_2BED5EC5191147F4815904695DFB5319"
|
||||||
"WorkingFolder" = "8:_E3419B32123541589220537FB1154298"
|
"WorkingFolder" = "8:_E3419B32123541589220537FB1154298"
|
||||||
"Icon" = "8:_C3608492E4D74B8683DE9CB3B3DE5D8A"
|
"Icon" = "8:_C3608492E4D74B8683DE9CB3B3DE5D8A"
|
||||||
|
@ -714,9 +714,9 @@
|
||||||
}
|
}
|
||||||
"ProjectOutput"
|
"ProjectOutput"
|
||||||
{
|
{
|
||||||
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_0A60FDE4B10F4534872956DB03BF83D8"
|
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_7686E608D62344A3B6FD5C91755693AA"
|
||||||
{
|
{
|
||||||
"SourcePath" = "8:..\\N00BS\\obj\\x86\\Windows\\net6.0-windows\\win-x86\\apphost.exe"
|
"SourcePath" = "8:..\\N00BS\\obj\\x86\\Windows\\net7.0-windows\\win-x86\\apphost.exe"
|
||||||
"TargetName" = "8:"
|
"TargetName" = "8:"
|
||||||
"Tag" = "8:"
|
"Tag" = "8:"
|
||||||
"Folder" = "8:_E3419B32123541589220537FB1154298"
|
"Folder" = "8:_E3419B32123541589220537FB1154298"
|
||||||
|
@ -734,7 +734,7 @@
|
||||||
"IsDependency" = "11:FALSE"
|
"IsDependency" = "11:FALSE"
|
||||||
"IsolateTo" = "8:"
|
"IsolateTo" = "8:"
|
||||||
"ProjectOutputGroupRegister" = "3:1"
|
"ProjectOutputGroupRegister" = "3:1"
|
||||||
"OutputConfiguration" = "8:Windows|x86"
|
"OutputConfiguration" = "8:"
|
||||||
"OutputGroupCanonicalName" = "8:PublishItems"
|
"OutputGroupCanonicalName" = "8:PublishItems"
|
||||||
"OutputProjectGuid" = "8:{6B45A1E8-0F54-4BF7-AF48-41B9FE676570}"
|
"OutputProjectGuid" = "8:{6B45A1E8-0F54-4BF7-AF48-41B9FE676570}"
|
||||||
"ShowKeyOutput" = "11:TRUE"
|
"ShowKeyOutput" = "11:TRUE"
|
||||||
|
|
|
@ -68,21 +68,16 @@ namespace HISP.Noobs
|
||||||
return rand.Next(0, 255).ToString();
|
return rand.Next(0, 255).ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GenIP()
|
|
||||||
{
|
|
||||||
return "0.0.0.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
BaseDir = Path.Combine(Environment.GetEnvironmentVariable("APPDATA"), "HISP", "N00BS");
|
BaseDir = Path.Combine(Environment.GetEnvironmentVariable("APPDATA"), "HISP", "N00BS");
|
||||||
Directory.CreateDirectory(BaseDir);
|
Directory.CreateDirectory(BaseDir);
|
||||||
IP = GenIP();
|
|
||||||
|
|
||||||
// Start Web Server
|
// Start Web Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cs = new ContentServer(IP);
|
cs = new ContentServer("127.0.0.1");
|
||||||
string[] fileList = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "client"), "*", SearchOption.AllDirectories);
|
string[] fileList = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "client"), "*", SearchOption.AllDirectories);
|
||||||
foreach (string file in fileList)
|
foreach (string file in fileList)
|
||||||
addToList(file);
|
addToList(file);
|
||||||
|
@ -112,7 +107,6 @@ namespace HISP.Noobs
|
||||||
ConfigReader.OpenConfig();
|
ConfigReader.OpenConfig();
|
||||||
ConfigReader.SqlLite = true;
|
ConfigReader.SqlLite = true;
|
||||||
ConfigReader.LogLevel = 0;
|
ConfigReader.LogLevel = 0;
|
||||||
ConfigReader.BindIP = IP;
|
|
||||||
ConfigReader.CrossDomainPolicyFile = Path.Combine(BaseDir, "CrossDomainPolicy.xml");
|
ConfigReader.CrossDomainPolicyFile = Path.Combine(BaseDir, "CrossDomainPolicy.xml");
|
||||||
ConfigReader.DatabaseName = Path.Combine(BaseDir, "game1.db");
|
ConfigReader.DatabaseName = Path.Combine(BaseDir, "game1.db");
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,12 @@ namespace HISP.Noobs
|
||||||
private void SystemTrayIcon_Load(object sender, EventArgs e)
|
private void SystemTrayIcon_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
clientProcess.StartInfo.FileName = "flash.dll";
|
clientProcess.StartInfo.FileName = "flash.dll";
|
||||||
clientProcess.StartInfo.Arguments = "http://127.0.0.1/horseisle.swf?SERVER=127.0.0.1&PORT=12321";
|
|
||||||
|
string serverIp = ConfigReader.BindIP;
|
||||||
|
if (serverIp == "0.0.0.0")
|
||||||
|
serverIp = "127.0.0.1";
|
||||||
|
|
||||||
|
clientProcess.StartInfo.Arguments = "http://127.0.0.1/horseisle.swf?SERVER=" + serverIp + "&PORT=" + ConfigReader.Port;
|
||||||
|
|
||||||
clientProcess.StartInfo.RedirectStandardOutput = true;
|
clientProcess.StartInfo.RedirectStandardOutput = true;
|
||||||
clientProcess.StartInfo.RedirectStandardError = true;
|
clientProcess.StartInfo.RedirectStandardError = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue