Unofficial CardLife revival project, pronounced like "celery"
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

21 řádky
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. }