diff --git a/Content.Server/MoMMILink.cs b/Content.Server/MoMMILink.cs index facd9ce93f..fb944a5525 100644 --- a/Content.Server/MoMMILink.cs +++ b/Content.Server/MoMMILink.cs @@ -8,7 +8,6 @@ using Content.Server.Interfaces.Chat; using Content.Shared; using Newtonsoft.Json; using Robust.Server.Interfaces.ServerStatus; -using Robust.Server.ServerStatus; using Robust.Shared.Asynchronous; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.IoC; @@ -73,9 +72,9 @@ namespace Content.Server } } - private bool _handleChatPost(HttpMethod method, HttpListenerRequest request, HttpListenerResponse response) + private bool _handleChatPost(IStatusHandlerContext context) { - if (method != HttpMethod.Post || request.Url!.AbsolutePath != "/ooc") + if (context.RequestMethod != HttpMethod.Post || context.Url!.AbsolutePath != "/ooc") { return false; } @@ -84,14 +83,14 @@ namespace Content.Server if (string.IsNullOrEmpty(password)) { - response.StatusCode = (int) HttpStatusCode.Forbidden; + context.RespondError(HttpStatusCode.Forbidden); return true; } OOCPostMessage message = null; try { - message = request.GetFromJson(); + message = context.RequestBodyJson(); } catch (JsonSerializationException) { @@ -100,19 +99,19 @@ namespace Content.Server if (message == null) { - response.StatusCode = (int) HttpStatusCode.BadRequest; + context.RespondError(HttpStatusCode.BadRequest); return true; } if (message.Password != password) { - response.StatusCode = (int) HttpStatusCode.Forbidden; + context.RespondError(HttpStatusCode.Forbidden); return true; } _taskManager.RunOnMainThread(() => _chatManager.SendHookOOC(message.Sender, message.Contents)); - response.StatusCode = (int) HttpStatusCode.OK; + context.Respond("Success", HttpStatusCode.OK); return false; } diff --git a/RobustToolbox b/RobustToolbox index 58560f589f..feaa69f825 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 58560f589f6defe7e092cecd71b2353d26a2220d +Subproject commit feaa69f825f452a016d9eba169009d1d4f20b8ef diff --git a/SpaceStation14.sln b/SpaceStation14.sln index b83df1d403..9736962bea 100644 --- a/SpaceStation14.sln +++ b/SpaceStation14.sln @@ -79,6 +79,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Client.NameGenerator EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Client.Injectors", "RobustToolbox\Robust.Client.Injectors\Robust.Client.Injectors.csproj", "{8922428F-17C3-47A7-BFE9-570DEB2464DA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.HttpListener", "RobustToolbox\ManagedHttpListener\src\System.Net.HttpListener.csproj", "{3429ACDA-F32F-4710-90F5-8C6DF4800304}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX.IL.Cecil", "RobustToolbox\XamlX\src\XamlX.IL.Cecil\XamlX.IL.Cecil.csproj", "{16F7DE32-0186-44B9-9345-0C20D1BF2422}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XamlX", "XamlX", "{AFF53804-115F-4E67-B81F-26265EA27880}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX", "RobustToolbox\XamlX\src\XamlX\XamlX.csproj", "{23F09C45-950E-4DB7-A465-E937450FF008}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX.Runtime", "RobustToolbox\XamlX\src\XamlX.Runtime\XamlX.Runtime.csproj", "{440426C1-8DCA-43F6-967F-94439B8DAF47}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -167,6 +177,22 @@ Global {8922428F-17C3-47A7-BFE9-570DEB2464DA}.Debug|Any CPU.Build.0 = Debug|Any CPU {8922428F-17C3-47A7-BFE9-570DEB2464DA}.Release|Any CPU.ActiveCfg = Release|Any CPU {8922428F-17C3-47A7-BFE9-570DEB2464DA}.Release|Any CPU.Build.0 = Release|Any CPU + {3429ACDA-F32F-4710-90F5-8C6DF4800304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3429ACDA-F32F-4710-90F5-8C6DF4800304}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3429ACDA-F32F-4710-90F5-8C6DF4800304}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3429ACDA-F32F-4710-90F5-8C6DF4800304}.Release|Any CPU.Build.0 = Release|Any CPU + {16F7DE32-0186-44B9-9345-0C20D1BF2422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16F7DE32-0186-44B9-9345-0C20D1BF2422}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16F7DE32-0186-44B9-9345-0C20D1BF2422}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16F7DE32-0186-44B9-9345-0C20D1BF2422}.Release|Any CPU.Build.0 = Release|Any CPU + {23F09C45-950E-4DB7-A465-E937450FF008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23F09C45-950E-4DB7-A465-E937450FF008}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23F09C45-950E-4DB7-A465-E937450FF008}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23F09C45-950E-4DB7-A465-E937450FF008}.Release|Any CPU.Build.0 = Release|Any CPU + {440426C1-8DCA-43F6-967F-94439B8DAF47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {440426C1-8DCA-43F6-967F-94439B8DAF47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {440426C1-8DCA-43F6-967F-94439B8DAF47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {440426C1-8DCA-43F6-967F-94439B8DAF47}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -188,6 +214,11 @@ Global {1FAE651D-29D8-437A-9864-47CE0D180016} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} {3CFEB7DB-12C6-46F3-89FC-1450F3016FFA} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} {8922428F-17C3-47A7-BFE9-570DEB2464DA} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} + {3429ACDA-F32F-4710-90F5-8C6DF4800304} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} + {AFF53804-115F-4E67-B81F-26265EA27880} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} + {16F7DE32-0186-44B9-9345-0C20D1BF2422} = {AFF53804-115F-4E67-B81F-26265EA27880} + {23F09C45-950E-4DB7-A465-E937450FF008} = {AFF53804-115F-4E67-B81F-26265EA27880} + {440426C1-8DCA-43F6-967F-94439B8DAF47} = {AFF53804-115F-4E67-B81F-26265EA27880} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AA37ED9F-F8D6-468E-A101-658AD605B09A}