aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
authorMW2007-08-13 15:55:36 +0000
committerMW2007-08-13 15:55:36 +0000
commit04b1767886af28fa1793c46a1cbe4b3f49eefca6 (patch)
treef7c1fc2fc19a5dce8e4e78537ff6a87c75a7dda2 /OpenSim/Grid/UserServer/UserManager.cs
parentAdded the SetPartText access method to SceneObjectGroup to set the text of me... (diff)
downloadopensim-SC_OLD-04b1767886af28fa1793c46a1cbe4b3f49eefca6.zip
opensim-SC_OLD-04b1767886af28fa1793c46a1cbe4b3f49eefca6.tar.gz
opensim-SC_OLD-04b1767886af28fa1793c46a1cbe4b3f49eefca6.tar.bz2
opensim-SC_OLD-04b1767886af28fa1793c46a1cbe4b3f49eefca6.tar.xz
Separated Login Service from usermanager, which helps to clean up the code a bit and also should help to integrate the inventory server (when it is wrote/finished).
Diffstat (limited to 'OpenSim/Grid/UserServer/UserManager.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs57
1 files changed, 1 insertions, 56 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index c459b93..4203ba6 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -41,61 +41,6 @@ namespace OpenSim.Grid.UserServer
41 { 41 {
42 } 42 }
43 43
44 /// <summary> 44
45 /// Customises the login response and fills in missing values.
46 /// </summary>
47 /// <param name="response">The existing response</param>
48 /// <param name="theUser">The user profile</param>
49 public override void CustomiseResponse( LoginResponse response, UserProfileData theUser)
50 {
51 // Load information from the gridserver
52 SimProfileData SimInfo = new SimProfileData();
53 SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
54
55 // Customise the response
56 // Home Location
57 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " +
58 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
59 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
60
61 // Destination
62 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
63 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
64 response.SimPort = (Int32)SimInfo.serverPort;
65 response.RegionX = SimInfo.regionLocX;
66 response.RegionY = SimInfo.regionLocY;
67
68 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
69 string capsPath = Util.GetRandomCapsPath();
70 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
71
72 // Notify the target of an incoming user
73 Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI+ ")");
74
75 // Prepare notification
76 Hashtable SimParams = new Hashtable();
77 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
78 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
79 SimParams["firstname"] = theUser.username;
80 SimParams["lastname"] = theUser.surname;
81 SimParams["agent_id"] = theUser.UUID.ToString();
82 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
83 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
84 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
85 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
86 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
87 SimParams["caps_path"] = capsPath;
88 ArrayList SendParams = new ArrayList();
89 SendParams.Add(SimParams);
90
91 // Update agent with target sim
92 theUser.currentAgent.currentRegion = SimInfo.UUID;
93 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
94
95 System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
96 // Send
97 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
98 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 3000);
99 }
100 } 45 }
101} 46}