From a9dde515ba7d35b6069a3b2cd8b66bb72b007801 Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 22 Jun 2007 18:28:49 +0000 Subject: SandBox mode login now shares a base class with the grid mode user server. To allow people to login without creating accounts first in sandbox mode anytime a login request is received without a matching account already being in the database, a new account will be made. (also in sandbox mode, passwords aren't currently used). --- .../OpenGridServices.UserServer/UserManager.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenGridServices/OpenGridServices.UserServer') diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs index 6f5f054..14e330b 100644 --- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs +++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs @@ -55,7 +55,7 @@ namespace OpenGridServices.UserServer /// /// The existing response /// The user profile - public override void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser) + public override void CustomiseResponse(ref LoginResponse response, ref UserProfileData theUser) { // Load information from the gridserver SimProfile SimInfo = new SimProfile(); @@ -63,15 +63,15 @@ namespace OpenGridServices.UserServer // Customise the response // Home Location - response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + + response.Home = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; // Destination - response["sim_ip"] = SimInfo.sim_ip; - response["sim_port"] = (Int32)SimInfo.sim_port; - response["region_y"] = (Int32)SimInfo.RegionLocY * 256; - response["region_x"] = (Int32)SimInfo.RegionLocX * 256; + response.SimAddress = SimInfo.sim_ip; + response.SimPort = (Int32)SimInfo.sim_port; + response.RegionX = SimInfo.RegionLocY ; + response.RegionY = SimInfo.RegionLocX ; // Notify the target of an incoming user Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")"); @@ -83,7 +83,7 @@ namespace OpenGridServices.UserServer SimParams["firstname"] = theUser.username; SimParams["lastname"] = theUser.surname; SimParams["agent_id"] = theUser.UUID.ToString(); - SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response["circuit_code"]); + SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); -- cgit v1.1