Unofficial CardLife revival project, pronounced like "celery"
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

21 lignes
709B

  1. using System.Net;
  2. using System.Text;
  3. namespace CLre_server.WebStatus
  4. {
  5. public class ConfigurationEndpoints
  6. {
  7. [WebEndpoint("/c/game.json")]
  8. public static void GameServerSettings (HttpListenerContext ctx)
  9. {
  10. ctx.Response.Headers.Add("Content-Type", "application/json");
  11. GameServer.GameServerSettings gss = API.MainServer.Server.Instance.GameServerSettings;
  12. string json = UnityEngine.JsonUtility.ToJson(gss);
  13. #if DEBUG
  14. API.Utility.Logging.MetaLog("JSONified settings: " + json);
  15. #endif
  16. byte[] output = Encoding.UTF8.GetBytes(json);
  17. ctx.Response.OutputStream.Write(output, 0, output.Length);
  18. }
  19. }
  20. }