mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 21:25:51 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07c12f2cb7 | ||
|
|
cf81be7329 | ||
|
|
f702725b9b | ||
|
|
3bd0fa5ba3 | ||
|
|
59330ea345 | ||
|
|
57a2ff3462 | ||
|
|
aab1932199 | ||
|
|
857a1768ba | ||
|
|
2d54a04613 | ||
|
|
3f81862763 | ||
|
|
9c18f042b9 | ||
|
|
dc949325a1 | ||
|
|
88b37a9bbc | ||
|
|
3a8c07098d | ||
|
|
ada0777275 | ||
|
|
21706a82fb |
48
APIServer.cs
48
APIServer.cs
@@ -28,7 +28,7 @@ namespace server
|
||||
{
|
||||
try
|
||||
{
|
||||
//3 different servers for 3 different stages of the game, the apis change so much idk anymore
|
||||
//2 different servers for 2 different stages of the game, the apis change so much idk anymore
|
||||
this.listener.Prefixes.Add("http://localhost:" + start.Program.version + "/");
|
||||
if (start.Program.version == "2017")
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace server
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("API Requested: " + rawUrl);
|
||||
Console.WriteLine("API Requested (rawUrl): " + rawUrl);
|
||||
}
|
||||
Console.WriteLine("API Data: " + text);
|
||||
if (Url.StartsWith("versioncheck"))
|
||||
@@ -74,6 +74,13 @@ namespace server
|
||||
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
|
||||
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
|
||||
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
|
||||
if (new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/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;
|
||||
start.Program.bannedflag = true;
|
||||
}
|
||||
}
|
||||
if (Url == "platformlogin/v6")
|
||||
{
|
||||
@@ -82,6 +89,10 @@ namespace server
|
||||
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
||||
{
|
||||
s = ModerationBlockDetails;
|
||||
if (start.Program.bannedflag == true)
|
||||
{
|
||||
s = Banned;
|
||||
}
|
||||
}
|
||||
if (Url == "config/v1/amplitude")
|
||||
{
|
||||
@@ -141,6 +152,10 @@ namespace server
|
||||
{
|
||||
s = PlayerEventsResponse;
|
||||
}
|
||||
if (Url == "activities/charades/v1/words")
|
||||
{
|
||||
s = Activities.Charades.words();
|
||||
}
|
||||
if (Url == "gamesessions/v2/joinrandom")
|
||||
{
|
||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||
@@ -171,6 +186,7 @@ namespace server
|
||||
string rawUrl = request.RawUrl;
|
||||
string Url = "";
|
||||
byte[] bytes = null;
|
||||
string signature = request.Headers.Get("X-RNSIG");
|
||||
if (rawUrl.StartsWith("/api/"))
|
||||
{
|
||||
Url = rawUrl.Remove(0, 5);
|
||||
@@ -181,7 +197,7 @@ namespace server
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("API Requested: " + rawUrl);
|
||||
Console.WriteLine("API Requested (rawUrl): " + rawUrl);
|
||||
}
|
||||
string text;
|
||||
string s = "";
|
||||
@@ -212,6 +228,13 @@ namespace server
|
||||
CachedPlayerID = ulong.Parse(text.Remove(0, 32));
|
||||
CachedPlatformID = ulong.Parse(text.Remove(0, 22));
|
||||
File.WriteAllText("SaveData\\Profile\\userid.txt", Convert.ToString(CachedPlayerID));
|
||||
if (new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/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;
|
||||
start.Program.bannedflag = true;
|
||||
}
|
||||
}
|
||||
if (Url == "platformlogin/v1/loginaccount")
|
||||
{
|
||||
@@ -244,6 +267,10 @@ namespace server
|
||||
if (Url == "PlayerReporting/v1/moderationBlockDetails")
|
||||
{
|
||||
s = ModerationBlockDetails;
|
||||
if (start.Program.bannedflag == true)
|
||||
{
|
||||
s = Banned;
|
||||
}
|
||||
}
|
||||
if (Url == "//api/chat/v2/myChats?mode=0&count=50")
|
||||
{
|
||||
@@ -361,6 +388,10 @@ namespace server
|
||||
{
|
||||
s = PlayerEventsResponse;
|
||||
}
|
||||
if (Url == "activities/charades/v1/words")
|
||||
{
|
||||
s = Activities.Charades.words();
|
||||
}
|
||||
if (Url == "gamesessions/v2/joinrandom")
|
||||
{
|
||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||
@@ -373,11 +404,9 @@ namespace server
|
||||
{
|
||||
bytes = Encoding.UTF8.GetBytes((JsonConvert.SerializeObject(gamesessions2018.GameSessions2.JoinRoom(text))));
|
||||
}
|
||||
if (rawUrl.Contains("//api/images/v4/uploadtransient?gameSessionId=2018"))
|
||||
{
|
||||
File.WriteAllBytes("SaveData\\Images\\image" + Convert.ToString(int.Parse(File.ReadAllText("SaveData\\Images\\count.txt") + 1)) + ".png", Encoding.UTF8.GetBytes(text.Remove(0, 50).Remove(text.Length - 48, 48)));
|
||||
int imagecount = int.Parse(File.ReadAllText("SaveData\\Images\\count.txt"));
|
||||
File.WriteAllText("SaveData\\Images\\count.txt", Convert.ToString(imagecount + 1));
|
||||
if (rawUrl == "//api/sanitize/v1/isPure")
|
||||
{
|
||||
s = JsonConvert.SerializeObject(Sanitize.SanitizeRequest(text));
|
||||
}
|
||||
if (Url == "avatar/v3/saved")
|
||||
{
|
||||
@@ -422,7 +451,8 @@ namespace server
|
||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||
public static string ModerationBlockDetails = "{\"ReportCategory\":0,\"Duration\":0,\"GameSessionId\":0,\"Message\":\"\"}";
|
||||
public static string ImagesV2Named = "[{\"FriendlyImageName\":\"DormRoomBucket\",\"ImageName\":\"OpenRec\",\"StartTime\":\"2021-12-27T21:27:38.1880175-08:00\",\"EndTime\":\"2043-12-27T21:27:38.1880399-08:00\"}";
|
||||
|
||||
|
||||
public static string Banned = "{\"ReportCategory\":1,\"Duration\":10,\"GameSessionId\":100,\"Message\":\"You have been banned. You are probably a little kid and are now whining at your VR headset. If you aren't a little kid, DM me to appeal.\"}";
|
||||
private HttpListener listener = new HttpListener();
|
||||
}
|
||||
}
|
||||
|
||||
197
Activities.cs
Normal file
197
Activities.cs
Normal file
@@ -0,0 +1,197 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace api
|
||||
{
|
||||
// Token: 0x0200000B RID: 11
|
||||
internal class Activities
|
||||
{
|
||||
// Token: 0x0200000C RID: 12
|
||||
public class Charades
|
||||
{
|
||||
// Token: 0x0600001D RID: 29 RVA: 0x0000410C File Offset: 0x0000230C
|
||||
public static string words()
|
||||
{
|
||||
List<Activities.Charades.word> value = new List<Activities.Charades.word>
|
||||
{
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "talking ben",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "lemon",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "grape",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "roblox",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "tree",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "cloud",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "iphone",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "your house",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "spaghetti",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "lean",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "bitcoin",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "nft",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "grass",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "recroom2016",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "joker",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "fortnite",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "woman",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "spiderman",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "vr",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "among us",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "coach",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "coach with a gun",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "funny fish",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "skinwalker",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "christmas tree",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "ur mom",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "stick of ram",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "big mac",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "ninetndo switch",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "crescendo",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "boxing",
|
||||
Difficulty = 0
|
||||
},
|
||||
new Activities.Charades.word
|
||||
{
|
||||
EN_US = "angry birds",
|
||||
Difficulty = 0
|
||||
}
|
||||
};
|
||||
return JsonConvert.SerializeObject(value);
|
||||
}
|
||||
|
||||
// Token: 0x0200000D RID: 13
|
||||
public class word
|
||||
{
|
||||
// Token: 0x17000004 RID: 4
|
||||
// (get) Token: 0x0600001F RID: 31 RVA: 0x000020DC File Offset: 0x000002DC
|
||||
// (set) Token: 0x06000020 RID: 32 RVA: 0x000020E4 File Offset: 0x000002E4
|
||||
public string EN_US { get; set; }
|
||||
|
||||
// Token: 0x17000005 RID: 5
|
||||
// (get) Token: 0x06000021 RID: 33 RVA: 0x000020ED File Offset: 0x000002ED
|
||||
// (set) Token: 0x06000022 RID: 34 RVA: 0x000020F5 File Offset: 0x000002F5
|
||||
public int Difficulty { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Class1.cs
Normal file
72
Class1.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace api2018
|
||||
{
|
||||
// Token: 0x02000081 RID: 129
|
||||
public class Sanitize
|
||||
{
|
||||
// Token: 0x0600039D RID: 925 RVA: 0x0000C51C File Offset: 0x0000A71C
|
||||
public static Sanitize.SanitizeRequestDTO SanitizeChatRequest(string chatMessage)
|
||||
{
|
||||
Sanitize.SanitizePostDTO sanitizePostDTO = JsonConvert.DeserializeObject<Sanitize.SanitizePostDTO>(chatMessage);
|
||||
return new Sanitize.SanitizeRequestDTO
|
||||
{
|
||||
StringValue = sanitizePostDTO.Value
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x0600039E RID: 926 RVA: 0x0000C51C File Offset: 0x0000A71C
|
||||
public static Sanitize.SanitizeRequestDTO SanitizeRequest(string chatMessage)
|
||||
{
|
||||
Sanitize.SanitizePostDTO sanitizePostDTO = JsonConvert.DeserializeObject<Sanitize.SanitizePostDTO>(chatMessage);
|
||||
return new Sanitize.SanitizeRequestDTO
|
||||
{
|
||||
StringValue = sanitizePostDTO.Value
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x0600039F RID: 927 RVA: 0x0000C544 File Offset: 0x0000A744
|
||||
public static string SanitizeChatMessageRequest(string postData, string signature)
|
||||
{
|
||||
Sanitize.SanitizePostDTO sanitizePostDTO = JsonConvert.DeserializeObject<Sanitize.SanitizePostDTO>(postData);
|
||||
return "\"" + sanitizePostDTO.Value + "\"";
|
||||
}
|
||||
|
||||
// Token: 0x02000082 RID: 130
|
||||
public class SanitizePostDTO
|
||||
{
|
||||
// Token: 0x1700016F RID: 367
|
||||
// (get) Token: 0x060003A1 RID: 929 RVA: 0x000039AA File Offset: 0x00001BAA
|
||||
// (set) Token: 0x060003A2 RID: 930 RVA: 0x000039B2 File Offset: 0x00001BB2
|
||||
public string Value { get; set; }
|
||||
|
||||
// Token: 0x17000170 RID: 368
|
||||
// (get) Token: 0x060003A3 RID: 931 RVA: 0x000039BB File Offset: 0x00001BBB
|
||||
// (set) Token: 0x060003A4 RID: 932 RVA: 0x000039C3 File Offset: 0x00001BC3
|
||||
public int ReplacementChar { get; set; }
|
||||
}
|
||||
|
||||
// Token: 0x02000083 RID: 131
|
||||
public class SanitizeRequestDTO
|
||||
{
|
||||
// Token: 0x17000171 RID: 369
|
||||
// (get) Token: 0x060003A6 RID: 934 RVA: 0x000039CC File Offset: 0x00001BCC
|
||||
// (set) Token: 0x060003A7 RID: 935 RVA: 0x000039D4 File Offset: 0x00001BD4
|
||||
public string StringValue { get; set; }
|
||||
}
|
||||
|
||||
// Token: 0x02000084 RID: 132
|
||||
public class SanitizeStringRequest
|
||||
{
|
||||
// Token: 0x060003A9 RID: 937 RVA: 0x000039DD File Offset: 0x00001BDD
|
||||
public SanitizeStringRequest(string text)
|
||||
{
|
||||
this.value = text;
|
||||
}
|
||||
|
||||
// Token: 0x040002E6 RID: 742
|
||||
public string value;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Download/banned.txt
Normal file
1
Download/banned.txt
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
||||
@@ -1,3 +1,10 @@
|
||||
Patch v0.4.2:
|
||||
-Fixed the issue with only hosts being able to start the games, now everyone is a host!
|
||||
-Added basic charades cards, now charades is possible!
|
||||
|
||||
Patch v0.4.1:
|
||||
-Fixed the room creation feature
|
||||
|
||||
Third public release of OpenRec, and probably the biggest update to date.
|
||||
|
||||
Supports:
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.4.0
|
||||
0.5.0
|
||||
|
||||
@@ -11,33 +11,41 @@ namespace gamesessions2018
|
||||
// Token: 0x060000BE RID: 190 RVA: 0x00004C08 File Offset: 0x00002E08
|
||||
public static string JoinRandom(string jsonData)
|
||||
{
|
||||
long gamesessionid = 2018L;
|
||||
long? creatorid = 1243409L;
|
||||
long gamesessionid = 20181L;
|
||||
Console.WriteLine("OpenRec GameSession Room");
|
||||
GameSessions.JoinRandomRequest joinRandomRequest = JsonConvert.DeserializeObject<GameSessions.JoinRandomRequest>(jsonData);
|
||||
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")
|
||||
{
|
||||
gamesessionid = new Random().Next(0, 100);
|
||||
gamesessionid = new Random().Next(0, 99);
|
||||
}
|
||||
if (start.Program.version == "2017")
|
||||
{
|
||||
creatorid = (long?)APIServer.CachedPlayerID;
|
||||
}
|
||||
if (start.Program.bannedflag == true)
|
||||
{
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
{
|
||||
GameSessionId = gamesessionid,
|
||||
RegionId = "us",
|
||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||
RecRoomId = null,
|
||||
EventId = null,
|
||||
CreatorPlayerId = 1243409L,
|
||||
Name = "OpenRec Room",
|
||||
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
||||
Private = false,
|
||||
Sandbox = false,
|
||||
SupportsScreens = true,
|
||||
SupportsVR = true,
|
||||
GameInProgress = false,
|
||||
MaxCapacity = 20,
|
||||
IsFull = false
|
||||
};
|
||||
gamesessionid = 100L;
|
||||
}
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
{
|
||||
GameSessionId = gamesessionid,
|
||||
RegionId = "us",
|
||||
RoomId = joinRandomRequest.ActivityLevelIds[0],
|
||||
RecRoomId = null,
|
||||
EventId = null,
|
||||
CreatorPlayerId = creatorid,
|
||||
Name = "OpenRec Room",
|
||||
ActivityLevelId = joinRandomRequest.ActivityLevelIds[0],
|
||||
Private = false,
|
||||
Sandbox = false,
|
||||
SupportsScreens = true,
|
||||
SupportsVR = true,
|
||||
GameInProgress = false,
|
||||
MaxCapacity = 20,
|
||||
IsFull = false
|
||||
};
|
||||
|
||||
return JsonConvert.SerializeObject(new GameSessions.JoinResult
|
||||
{
|
||||
Result = 0,
|
||||
@@ -60,11 +68,15 @@ namespace gamesessions2018
|
||||
// Token: 0x060000C0 RID: 192 RVA: 0x00004D24 File Offset: 0x00002F24
|
||||
public static string Create(string jsonData)
|
||||
{
|
||||
long gamesessionid = 2016L;
|
||||
long gamesessionid = 20161L;
|
||||
Console.WriteLine("OpenRec GameSession Custom Room");
|
||||
if (File.ReadAllText("SaveData\\App\\privaterooms.txt") == "Enabled")
|
||||
{
|
||||
gamesessionid = new Random().Next(0, 100);
|
||||
gamesessionid = new Random().Next(0, 99);
|
||||
}
|
||||
if (start.Program.bannedflag == true)
|
||||
{
|
||||
gamesessionid = 100L;
|
||||
}
|
||||
GameSessions.CreateRequest createRequest = JsonConvert.DeserializeObject<GameSessions.CreateRequest>(jsonData);
|
||||
Config.localGameSession = new GameSessions.SessionInstance
|
||||
@@ -74,7 +86,7 @@ namespace gamesessions2018
|
||||
RoomId = createRequest.ActivityLevelId,
|
||||
RecRoomId = null,
|
||||
EventId = null,
|
||||
CreatorPlayerId = 1243409L,
|
||||
CreatorPlayerId = (long?)APIServer.CachedPlayerID,
|
||||
Name = "Custom Room",
|
||||
ActivityLevelId = createRequest.ActivityLevelId,
|
||||
Private = false,
|
||||
|
||||
@@ -55,14 +55,9 @@ namespace server
|
||||
this.listener.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||
|
||||
public static string BlankResponse = "";
|
||||
|
||||
|
||||
// Token: 0x04000192 RID: 402
|
||||
private HttpListener listener = new HttpListener();
|
||||
}
|
||||
}
|
||||
|
||||
59
Program.cs
59
Program.cs
@@ -18,14 +18,24 @@ namespace start
|
||||
|
||||
Start:
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + version + ")");
|
||||
Console.WriteLine("OpenRec - Open source RecNet server software. (Version: " + appversion + ")");
|
||||
Console.WriteLine("Made and provided by RecRoom 2016.");
|
||||
Console.WriteLine("Download source code here: https://github.com/recroom2016/OpenRec");
|
||||
Console.WriteLine("Discord: https://discord.gg/daC8QUhnFP" + Environment.NewLine);
|
||||
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(version)))
|
||||
if (!(new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/version.txt").Contains(appversion)))
|
||||
{
|
||||
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/Download/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("1) Changelog" + Environment.NewLine +"2) Change Settings" + Environment.NewLine + "3) Modify Profile" + Environment.NewLine + "4) Start Server");
|
||||
string readline = Console.ReadLine();
|
||||
if (readline == "1")
|
||||
@@ -116,7 +126,7 @@ namespace start
|
||||
File.WriteAllText("SaveData\\Profile\\username.txt", newusername);
|
||||
Console.Clear();
|
||||
Console.WriteLine("Success!");
|
||||
goto Start;
|
||||
goto Profile;
|
||||
}
|
||||
else if (readline3 == "2")
|
||||
{
|
||||
@@ -139,7 +149,7 @@ namespace start
|
||||
}
|
||||
Console.Clear();
|
||||
Console.WriteLine("Success!");
|
||||
goto Start;
|
||||
goto Profile;
|
||||
}
|
||||
else if (readline4 == "2")
|
||||
{
|
||||
@@ -159,7 +169,7 @@ namespace start
|
||||
}
|
||||
Console.Clear();
|
||||
Console.WriteLine("Success!");
|
||||
goto Start;
|
||||
goto Profile;
|
||||
}
|
||||
else if (readline4 == "3")
|
||||
{
|
||||
@@ -188,15 +198,7 @@ namespace start
|
||||
{
|
||||
Console.WriteLine("Please select the version of RecRoom the server should host: (2017, 2018)");
|
||||
string readline2 = Console.ReadLine();
|
||||
if (readline2 == "2016")
|
||||
{
|
||||
version = "2016";
|
||||
Console.Clear();
|
||||
Console.WriteLine("Version Selected: " + start.Program.version);
|
||||
new APIServer();
|
||||
new WebSocket();
|
||||
}
|
||||
else if (readline2 == "2017")
|
||||
if (readline2 == "2017")
|
||||
{
|
||||
version = "2017";
|
||||
Console.Clear();
|
||||
@@ -215,33 +217,10 @@ namespace start
|
||||
new WebSocket();
|
||||
}
|
||||
}
|
||||
if (readline == "5")
|
||||
{
|
||||
Console.Clear();
|
||||
goto ChatStart;
|
||||
|
||||
ChatStart:
|
||||
Console.WriteLine("Pinging the chat servers...");
|
||||
try
|
||||
{
|
||||
string ping = new WebClient().DownloadString("https://openrecchat.loca.lt/ping");
|
||||
}
|
||||
catch (Exception ex4)
|
||||
{
|
||||
Console.WriteLine("Chat servers currently offline...");
|
||||
Console.WriteLine("Press any key to continue:");
|
||||
Console.ReadKey();
|
||||
goto Start;
|
||||
}
|
||||
Console.WriteLine("Success!");
|
||||
Console.WriteLine("Press any key to continue:");
|
||||
Console.ReadKey();
|
||||
OpenRecNet.RecNet();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static string version = "0.4.0";
|
||||
public static string version = "";
|
||||
public static string appversion = "0.5.0";
|
||||
public static bool bannedflag = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2
Setup.cs
2
Setup.cs
@@ -53,7 +53,7 @@ namespace start
|
||||
}
|
||||
if (!(File.Exists("SaveData\\Profile\\userid.txt")))
|
||||
{
|
||||
File.WriteAllText("SaveData\\Profile\\userid.txt", "2");
|
||||
File.WriteAllText("SaveData\\Profile\\userid.txt", "10000000");
|
||||
}
|
||||
if (!(File.Exists("SaveData\\myrooms.txt")))
|
||||
{
|
||||
|
||||
BIN
websocket-sharp.dll
Normal file
BIN
websocket-sharp.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user