Changeset 314 for binary-improvements/MapRendering/Web/Web.cs
- Timestamp:
- Jan 18, 2018, 5:00:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Web.cs
r311 r314 237 237 238 238 if (_req.Url.AbsolutePath.StartsWith ("/session/verify")) { 239 ulong id = OpenID.Validate (_req); 240 if (id > 0) { 241 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address.ToString ()); 242 _con = con; 243 int level = GameManager.Instance.adminTools.GetAdminToolsClientInfo (id.ToString ()).PermissionLevel; 244 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", _req.RemoteEndPoint.ToString (), con.SteamID, level); 245 return level; 246 } else { 247 Log.Out ("Steam OpenID login failed from {0}", _req.RemoteEndPoint.ToString ()); 239 try { 240 ulong id = OpenID.Validate (_req); 241 if (id > 0) { 242 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address.ToString ()); 243 _con = con; 244 int level = GameManager.Instance.adminTools.GetAdminToolsClientInfo (id.ToString ()).PermissionLevel; 245 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", _req.RemoteEndPoint.ToString (), con.SteamID, level); 246 return level; 247 } else { 248 Log.Out ("Steam OpenID login failed from {0}", _req.RemoteEndPoint.ToString ()); 249 } 250 } catch (Exception e) { 251 Log.Error ("Error validating login:"); 252 Log.Exception (e); 248 253 } 249 254 }
Note:
See TracChangeset
for help on using the changeset viewer.