diff --git a/PayCheckServerLib/Responses/Challenge.cs b/PayCheckServerLib/Responses/Challenge.cs index 2e48702..ea7862f 100644 --- a/PayCheckServerLib/Responses/Challenge.cs +++ b/PayCheckServerLib/Responses/Challenge.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Helpers; using PayCheckServerLib.Jsons; diff --git a/PayCheckServerLib/Responses/Currency.cs b/PayCheckServerLib/Responses/Currency.cs index 0e03013..5e34984 100644 --- a/PayCheckServerLib/Responses/Currency.cs +++ b/PayCheckServerLib/Responses/Currency.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Helpers; using PayCheckServerLib.Jsons; diff --git a/PayCheckServerLib/Responses/Custom.cs b/PayCheckServerLib/Responses/Custom.cs index 991a54d..d7f7654 100644 --- a/PayCheckServerLib/Responses/Custom.cs +++ b/PayCheckServerLib/Responses/Custom.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using PayCheckServerLib.Helpers; namespace PayCheckServerLib.Responses diff --git a/PayCheckServerLib/Responses/DLCs.cs b/PayCheckServerLib/Responses/DLCs.cs index bcd0df6..dbd6b72 100644 --- a/PayCheckServerLib/Responses/DLCs.cs +++ b/PayCheckServerLib/Responses/DLCs.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons.Basic; diff --git a/PayCheckServerLib/Responses/Entitlements.cs b/PayCheckServerLib/Responses/Entitlements.cs index 6914f6a..7dbbfd9 100644 --- a/PayCheckServerLib/Responses/Entitlements.cs +++ b/PayCheckServerLib/Responses/Entitlements.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons; using PayCheckServerLib.Jsons.Basic; diff --git a/PayCheckServerLib/Responses/Friends.cs b/PayCheckServerLib/Responses/Friends.cs index f0cc42d..dfe50b7 100644 --- a/PayCheckServerLib/Responses/Friends.cs +++ b/PayCheckServerLib/Responses/Friends.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Helpers; using PayCheckServerLib.Jsons; diff --git a/PayCheckServerLib/Responses/Items.cs b/PayCheckServerLib/Responses/Items.cs index 75a9ed8..6abde06 100644 --- a/PayCheckServerLib/Responses/Items.cs +++ b/PayCheckServerLib/Responses/Items.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons; using PayCheckServerLib.Jsons.Basic; diff --git a/PayCheckServerLib/Responses/LobbyBlocked.cs b/PayCheckServerLib/Responses/LobbyBlocked.cs index da2ebba..1fb8dd3 100644 --- a/PayCheckServerLib/Responses/LobbyBlocked.cs +++ b/PayCheckServerLib/Responses/LobbyBlocked.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; namespace PayCheckServerLib.Responses { diff --git a/PayCheckServerLib/Responses/Orders.cs b/PayCheckServerLib/Responses/Orders.cs index c832f93..23224f3 100644 --- a/PayCheckServerLib/Responses/Orders.cs +++ b/PayCheckServerLib/Responses/Orders.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons; using PayCheckServerLib.Jsons.Basic; diff --git a/PayCheckServerLib/Responses/Session.cs b/PayCheckServerLib/Responses/Session.cs index 2059c71..c3c748d 100644 --- a/PayCheckServerLib/Responses/Session.cs +++ b/PayCheckServerLib/Responses/Session.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons.Basic; diff --git a/PayCheckServerLib/Responses/Telemetry.cs b/PayCheckServerLib/Responses/Telemetry.cs index 32e705a..1fae1a4 100644 --- a/PayCheckServerLib/Responses/Telemetry.cs +++ b/PayCheckServerLib/Responses/Telemetry.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; namespace PayCheckServerLib.Responses { diff --git a/PayCheckServerLib/Responses/VersionResponse.cs b/PayCheckServerLib/Responses/VersionResponse.cs index b293220..3dfbbb3 100644 --- a/PayCheckServerLib/Responses/VersionResponse.cs +++ b/PayCheckServerLib/Responses/VersionResponse.cs @@ -1,4 +1,7 @@ -using NetCoreServer; +using ModdableWebServer; +using ModdableWebServer.Attributes; +using ModdableWebServer.Helper; +using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Jsons; using System.Text.RegularExpressions; @@ -7,7 +10,7 @@ namespace PayCheckServerLib.Responses { public class VersionResponse { - static bool GenericVersionResponse(HttpRequest request, PC3Server.PC3Session session) + static bool GenericVersionResponse(HttpRequest request, ServerStruct serverStruct) { ResponseCreator response = new ResponseCreator(); @@ -44,50 +47,51 @@ static bool GenericVersionResponse(HttpRequest request, PC3Server.PC3Session ses }; response.SetBody(JsonConvert.SerializeObject(version)); - session.SendResponse(response.GetResponse()); + serverStruct.Response = response.GetResponse(); + ResponseSender.SendResponse(serverStruct); return true; } [HTTP("GET", "/iam/version")] - public static bool IamVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool IamVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/agreement/version")] - public static bool AgreementVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool AgreementVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/basic/version")] - public static bool BasicVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool BasicVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/platform/version")] - public static bool PlatformVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool PlatformVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/social/version")] - public static bool SocialVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool SocialVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/leaderboard/version")] - public static bool LeaderboardVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool LeaderboardVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/achievement/version")] - public static bool AchievementVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool AchievementVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/cloudsave/version")] - public static bool CloudSaveVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool CloudSaveVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/ugc/version")] - public static bool UGCVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool UGCVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/lobby/version")] - public static bool LobbyVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool LobbyVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/group/version")] - public static bool GroupVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool GroupVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/qosm/version")] - public static bool QOSMVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool QOSMVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/dsmcontroller/version")] - public static bool DSMControllerVersion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool DSMControllerVersion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } [HTTP("GET", "/game-telemetry/version")] - public static bool GameTelemetryVerion(HttpRequest request, PC3Server.PC3Session session) { return GenericVersionResponse(request, session); } + public static bool GameTelemetryVerion(HttpRequest request, ServerStruct serverStruct) { return GenericVersionResponse(request, serverStruct); } } } diff --git a/PayCheckServerLib/WSController/LobbyControl.cs b/PayCheckServerLib/WSController/LobbyControl.cs index 6ce33a4..8c6660f 100644 --- a/PayCheckServerLib/WSController/LobbyControl.cs +++ b/PayCheckServerLib/WSController/LobbyControl.cs @@ -1,13 +1,10 @@ using ModdableWebServer; using ModdableWebServer.Attributes; using ModdableWebServer.Helper; -using NetCoreServer; using Newtonsoft.Json; using PayCheckServerLib.Helpers; using PayCheckServerLib.Jsons; -using System.Reflection.PortableExecutable; using System.Text; -using static PayCheckServerLib.PC3Server; namespace PayCheckServerLib.WSController {