mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
OPENREC 7
This commit is contained in:
@@ -681,7 +681,7 @@ namespace server
|
|||||||
response.ContentLength64 = (long)bytes.Length;
|
response.ContentLength64 = (long)bytes.Length;
|
||||||
Stream outputStream = response.OutputStream;
|
Stream outputStream = response.OutputStream;
|
||||||
outputStream.Write(bytes, 0, bytes.Length);
|
outputStream.Write(bytes, 0, bytes.Length);
|
||||||
Thread.Sleep(20);
|
Thread.Sleep(400);
|
||||||
outputStream.Close();
|
outputStream.Close();
|
||||||
this.listener.Stop();
|
this.listener.Stop();
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ namespace api2018
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,13 +51,11 @@ namespace api2017
|
|||||||
ForceJuniorImages = false,
|
ForceJuniorImages = false,
|
||||||
HasBirthday = true
|
HasBirthday = true
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Token: 0x06000199 RID: 409 RVA: 0x00002BBE File Offset: 0x00000DBE
|
// Token: 0x06000199 RID: 409 RVA: 0x00002BBE File Offset: 0x00000DBE
|
||||||
public static string playerName()
|
|
||||||
{
|
|
||||||
return File.ReadAllText("playerNameConfig.txt");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace server
|
|||||||
{
|
{
|
||||||
Console.WriteLine("[NameServer.cs] has started.");
|
Console.WriteLine("[NameServer.cs] has started.");
|
||||||
new Thread(new ThreadStart(this.StartListen)).Start();
|
new Thread(new ThreadStart(this.StartListen)).Start();
|
||||||
|
new Thread(new ThreadStart(this.StartListen2)).Start();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -52,11 +53,42 @@ namespace server
|
|||||||
response.ContentLength64 = (long)bytes.Length;
|
response.ContentLength64 = (long)bytes.Length;
|
||||||
Stream outputStream = response.OutputStream;
|
Stream outputStream = response.OutputStream;
|
||||||
outputStream.Write(bytes, 0, bytes.Length);
|
outputStream.Write(bytes, 0, bytes.Length);
|
||||||
Thread.Sleep(1);
|
Thread.Sleep(400);
|
||||||
outputStream.Close();
|
outputStream.Close();
|
||||||
this.listener.Stop();
|
this.listener.Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void StartListen2()
|
||||||
|
{
|
||||||
|
//nameserver is ONLY for 2018
|
||||||
|
this.listener2.Prefixes.Add("http://localhost:56/");
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
this.listener2.Start();
|
||||||
|
Console.WriteLine("[NameServer2.cs] is listening.");
|
||||||
|
HttpListenerContext context = this.listener2.GetContext();
|
||||||
|
HttpListenerRequest request = context.Request;
|
||||||
|
HttpListenerResponse response = context.Response;
|
||||||
|
string rawUrl = request.RawUrl;
|
||||||
|
string s = "";
|
||||||
|
NSData data = new NSData()
|
||||||
|
{
|
||||||
|
API = "http://localhost:2018",
|
||||||
|
Notifications = "http://localhost:20161",
|
||||||
|
Images = "http://localhost:20182"
|
||||||
|
};
|
||||||
|
s = JsonConvert.SerializeObject(data);
|
||||||
|
Console.WriteLine("API Response: " + s);
|
||||||
|
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
||||||
|
response.ContentLength64 = (long)bytes.Length;
|
||||||
|
Stream outputStream = response.OutputStream;
|
||||||
|
outputStream.Write(bytes, 0, bytes.Length);
|
||||||
|
Thread.Sleep(500);
|
||||||
|
outputStream.Close();
|
||||||
|
this.listener2.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||||
public static string BlankResponse = "";
|
public static string BlankResponse = "";
|
||||||
public class NSData
|
public class NSData
|
||||||
@@ -69,5 +101,7 @@ namespace server
|
|||||||
|
|
||||||
// Token: 0x04000192 RID: 402
|
// Token: 0x04000192 RID: 402
|
||||||
private HttpListener listener = new HttpListener();
|
private HttpListener listener = new HttpListener();
|
||||||
|
|
||||||
|
private HttpListener listener2 = new HttpListener();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
Program.cs
13
Program.cs
@@ -73,16 +73,7 @@ namespace start
|
|||||||
{
|
{
|
||||||
Console.WriteLine("This version of OpenRec is outdated. We recommend you install the latest version, OpenRec " + new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt"));
|
Console.WriteLine("This version of OpenRec is outdated. We recommend you install the latest version, OpenRec " + new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt"));
|
||||||
}
|
}
|
||||||
if (File.Exists("SaveData\\Profile\\userid.txt"))
|
|
||||||
{
|
|
||||||
if (new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Update/banned.txt").Contains(File.ReadAllText("SaveData\\Profile\\userid.txt")))
|
|
||||||
{
|
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
|
||||||
Console.WriteLine("You are banned. Using this version of OpenRec will not work, please download OpenRec 0.4.2 or prior.");
|
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
|
||||||
bannedflag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Console.WriteLine("//Custom Room Downloader has been moved to the settings tab!" + Environment.NewLine);
|
Console.WriteLine("//Custom Room Downloader has been moved to the settings tab!" + Environment.NewLine);
|
||||||
Console.WriteLine("(1) What's New" + Environment.NewLine +"(2) Change Settings" + Environment.NewLine + "(3) Modify Profile" + Environment.NewLine + "(4) Build Download Links" + Environment.NewLine + "(5) Start Server");
|
Console.WriteLine("(1) What's New" + Environment.NewLine +"(2) Change Settings" + Environment.NewLine + "(3) Modify Profile" + Environment.NewLine + "(4) Build Download Links" + Environment.NewLine + "(5) Start Server");
|
||||||
string readline = Console.ReadLine();
|
string readline = Console.ReadLine();
|
||||||
@@ -367,7 +358,7 @@ namespace start
|
|||||||
}
|
}
|
||||||
else if (readline2 == "2018")
|
else if (readline2 == "2018")
|
||||||
{
|
{
|
||||||
Console.WriteLine("May, July or September (Beta) 2018: (M, J, S)");
|
Console.WriteLine("May, July or September (SEPTEMBER MIGHT NOT WORK) 2018: (M, J, S)");
|
||||||
string readline3 = Console.ReadLine();
|
string readline3 = Console.ReadLine();
|
||||||
if ((readline3 == "M") || (readline3 == "m"))
|
if ((readline3 == "M") || (readline3 == "m"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user