mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Quick fixes (awesome name)
This commit is contained in:
parent
68dbf50253
commit
0c8ff50176
5 changed files with 15 additions and 13 deletions
|
@ -6,9 +6,15 @@ public static class PatchworkHelper
|
|||
{
|
||||
static int patchworkMajorVer = ServerConfiguration.Instance.PatchworkMajorVersionMinimum;
|
||||
static int patchworkMinorVer = ServerConfiguration.Instance.PatchworkMinorVersionMinimum;
|
||||
public static bool userHasValidPatchworkUserAgent(string userAgent)
|
||||
public static bool UserHasValidPatchworkUserAgent(string userAgent)
|
||||
{
|
||||
if (userAgent.StartsWith("PatchworkLBP"))
|
||||
string userAgentPrefix = "PatchworkLBP";
|
||||
char gameVersion = userAgent[userAgentPrefix.Length];
|
||||
|
||||
if (userAgent.StartsWith(userAgentPrefix))
|
||||
return false;
|
||||
|
||||
if (gameVersion is not '1' or '2' or '3' or 'V')
|
||||
return false;
|
||||
|
||||
string[] patchworkVer = userAgent.Split(' ')[1].Split('.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue