Changeset 420 for binary-improvements/MapRendering/Web/Web.cs
- Timestamp:
- Mar 28, 2023, 5:11:02 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Web.cs
r369 r420 7 7 using System.Text; 8 8 using System.Threading; 9 using AllocsFixes.FileCache;10 9 using AllocsFixes.NetConnections.Servers.Web.Handlers; 11 10 using AllocsFixes.NetConnections.Servers.Web.SSE; 12 11 using UnityEngine; 12 using Webserver.FileCache; 13 13 14 14 namespace AllocsFixes.NetConnections.Servers.Web { … … 25 25 public Web () { 26 26 try { 27 int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> ( "ControlPanelPort"));27 int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> (nameof(EnumGamePrefs.WebDashboardPort))); 28 28 if (webPort < 1 || webPort > 65533) { 29 Log.Out ("Webserver not started ( ControlPanelPort not within 1-65533)");29 Log.Out ("Webserver not started (WebDashboardPort not within 1-65533)"); 30 30 return; 31 31 } 32 32 33 33 if (!Directory.Exists (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + 34 "/webserver ")) {35 Log.Out ("Webserver not started (folder \"webserver \" not found in WebInterface mod folder)");34 "/webserver_legacy")) { 35 Log.Out ("Webserver not started (folder \"webserver_legacy\" not found in WebInterface mod folder)"); 36 36 return; 37 37 } … … 40 40 bool useStaticCache = false; 41 41 42 string dataFolder = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/webserver ";42 string dataFolder = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/webserver_legacy"; 43 43 44 44 if (!HttpListener.IsSupported) { … … 60 60 RegisterPathHandler ("/map/", new StaticHandler ( 61 61 GameIO.GetSaveGameDir () + "/map", 62 MapRendering.MapRender ing.GetTileCache (),62 MapRendering.MapRenderer.GetTileCache (), 63 63 false, 64 64 "web.map") … … 248 248 if (con != null) { 249 249 _con = con; 250 return GameManager.Instance.adminTools. GetUserPermissionLevel (_con.UserId);250 return GameManager.Instance.adminTools.Users.GetUserPermissionLevel (_con.UserId); 251 251 } 252 252 } … … 270 270 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address); 271 271 _con = con; 272 int level = GameManager.Instance.adminTools. GetUserPermissionLevel (con.UserId);272 int level = GameManager.Instance.adminTools.Users.GetUserPermissionLevel (con.UserId); 273 273 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", 274 274 remoteEndpointString, con.UserId, level);
Note:
See TracChangeset
for help on using the changeset viewer.