diff --git a/ImageServer.cs b/ImageServer.cs index 9dd70cf..c452e8c 100644 --- a/ImageServer.cs +++ b/ImageServer.cs @@ -55,6 +55,10 @@ namespace server { i = new WebClient().DownloadData("https://cdn.rec.net" + rawUrl.Remove(0, 1)); } + else if (rawUrl.StartsWith("//data/")) + { + i = new WebClient().DownloadData("https://cdn.rec.net" + rawUrl.Remove(0, 1)); + } else { try diff --git a/NameServer.cs b/NameServer.cs index 9095998..df47b60 100644 --- a/NameServer.cs +++ b/NameServer.cs @@ -40,26 +40,13 @@ namespace server HttpListenerResponse response = context.Response; string rawUrl = request.RawUrl; string s = ""; - if (Program.version == "2019") - { - NSData2 data2 = new NSData2() - { - API = "http://localhost:2018", - Notifications = "http://localhost:20161", - Images = "http://localhost:20182" - }; - s = JsonConvert.SerializeObject(data2); - } - else - { - NSData data = new NSData() - { - API = "http://localhost:2018", - Notifications = "http://localhost:20161", - Images = "http://localhost:20182" - }; - s = JsonConvert.SerializeObject(data); - } + 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; @@ -70,11 +57,8 @@ namespace server this.listener.Stop(); } } - public static string VersionCheckResponse = "{\"ValidVersion\":true}"; - public static string BlankResponse = ""; - public class NSData { public string API { get; set; } @@ -82,38 +66,7 @@ namespace server public string Images { get; set; } } - public class NSData2 - { - // Token: 0x17000013 RID: 19 - // (get) Token: 0x06000040 RID: 64 RVA: 0x00002256 File Offset: 0x00000456 - // (set) Token: 0x06000041 RID: 65 RVA: 0x0000225E File Offset: 0x0000045E - public string Auth { get; set; } - - // Token: 0x17000014 RID: 20 - // (get) Token: 0x06000042 RID: 66 RVA: 0x00002267 File Offset: 0x00000467 - // (set) Token: 0x06000043 RID: 67 RVA: 0x0000226F File Offset: 0x0000046F - public string API { get; set; } - - // Token: 0x17000015 RID: 21 - // (get) Token: 0x06000044 RID: 68 RVA: 0x00002278 File Offset: 0x00000478 - // (set) Token: 0x06000045 RID: 69 RVA: 0x00002280 File Offset: 0x00000480 - public string WWW { get; set; } - - // Token: 0x17000016 RID: 22 - // (get) Token: 0x06000046 RID: 70 RVA: 0x00002289 File Offset: 0x00000489 - // (set) Token: 0x06000047 RID: 71 RVA: 0x00002291 File Offset: 0x00000491 - public string Notifications { get; set; } - - // Token: 0x17000017 RID: 23 - // (get) Token: 0x06000048 RID: 72 RVA: 0x0000229A File Offset: 0x0000049A - // (set) Token: 0x06000049 RID: 73 RVA: 0x000022A2 File Offset: 0x000004A2 - public string Images { get; set; } - - // Token: 0x17000018 RID: 24 - // (get) Token: 0x0600004A RID: 74 RVA: 0x000022AB File Offset: 0x000004AB - // (set) Token: 0x0600004B RID: 75 RVA: 0x000022B3 File Offset: 0x000004B3 - public string Commerce { get; set; } - } + // Token: 0x04000192 RID: 402 private HttpListener listener = new HttpListener(); } diff --git a/OpenRec_.csproj b/OpenRec_.csproj index a13db93..b638a47 100644 --- a/OpenRec_.csproj +++ b/OpenRec_.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 icon2.ico OpenRec OpenRec diff --git a/Program.cs b/Program.cs index ad59de2..a02313f 100644 --- a/Program.cs +++ b/Program.cs @@ -53,6 +53,7 @@ namespace start else { + Console.Clear(); goto Start; } } @@ -401,9 +402,12 @@ namespace start new APIServer(); new WebSocket(); } + } + Console.WriteLine(msg); } } + public static string msg = "//This is the server sending and recieving data from recroom." + Environment.NewLine + "//Ignore this if you don't know what this means." + Environment.NewLine + "//Please start up the build now."; public static string version = ""; public static string appversion = "0.6.9"; public static bool bannedflag = false; diff --git a/Setup.cs b/Setup.cs index 04b694e..9703d15 100644 --- a/Setup.cs +++ b/Setup.cs @@ -103,7 +103,7 @@ namespace start { try { - api.CustomRooms.RoomGet("gizmoface"); + api.CustomRooms.RoomGet("gogo9"); } catch {