diff options
author | Sean Dague | 2008-04-10 13:53:06 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-10 13:53:06 +0000 |
commit | c176caeb05c2264654b764e4d010561da60c24fc (patch) | |
tree | 87e0cab128ecaac57c5995df4cf5048185fe383f /OpenSim/Grid/UserServer/UserLoginService.cs | |
parent | * Brings back map tile generation based on the terrain. The algorithm produc... (diff) | |
download | opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.zip opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.gz opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.bz2 opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.xz |
moved fields to properties for UserDataProfile, which was
actually a little more work than I expected given the copious
use of out params.
Diffstat (limited to 'OpenSim/Grid/UserServer/UserLoginService.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index d409951..f655415 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -85,14 +85,14 @@ namespace OpenSim.Grid.UserServer | |||
85 | { | 85 | { |
86 | SimInfo = | 86 | SimInfo = |
87 | RegionProfileData.RequestSimProfileData( | 87 | RegionProfileData.RequestSimProfileData( |
88 | theUser.currentAgent.currentHandle, m_config.GridServerURL, | 88 | theUser.CurrentAgent.currentHandle, m_config.GridServerURL, |
89 | m_config.GridSendKey, m_config.GridRecvKey); | 89 | m_config.GridSendKey, m_config.GridRecvKey); |
90 | } | 90 | } |
91 | else if (startLocationRequest == "home") | 91 | else if (startLocationRequest == "home") |
92 | { | 92 | { |
93 | SimInfo = | 93 | SimInfo = |
94 | RegionProfileData.RequestSimProfileData( | 94 | RegionProfileData.RequestSimProfileData( |
95 | theUser.homeRegion, m_config.GridServerURL, | 95 | theUser.HomeRegion, m_config.GridServerURL, |
96 | m_config.GridSendKey, m_config.GridRecvKey); | 96 | m_config.GridSendKey, m_config.GridRecvKey); |
97 | } | 97 | } |
98 | else | 98 | else |
@@ -104,7 +104,7 @@ namespace OpenSim.Grid.UserServer | |||
104 | // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' | 104 | // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' |
105 | SimInfo = | 105 | SimInfo = |
106 | RegionProfileData.RequestSimProfileData( | 106 | RegionProfileData.RequestSimProfileData( |
107 | theUser.currentAgent.currentHandle, m_config.GridServerURL, | 107 | theUser.CurrentAgent.currentHandle, m_config.GridServerURL, |
108 | m_config.GridSendKey, m_config.GridRecvKey); | 108 | m_config.GridSendKey, m_config.GridRecvKey); |
109 | } | 109 | } |
110 | else | 110 | else |
@@ -120,7 +120,7 @@ namespace OpenSim.Grid.UserServer | |||
120 | m_log.Info("[LOGIN]: Didn't find region with a close name match sending to home location"); | 120 | m_log.Info("[LOGIN]: Didn't find region with a close name match sending to home location"); |
121 | SimInfo = | 121 | SimInfo = |
122 | RegionProfileData.RequestSimProfileData( | 122 | RegionProfileData.RequestSimProfileData( |
123 | theUser.homeRegion, m_config.GridServerURL, | 123 | theUser.HomeRegion, m_config.GridServerURL, |
124 | m_config.GridSendKey, m_config.GridRecvKey); | 124 | m_config.GridSendKey, m_config.GridRecvKey); |
125 | } else { | 125 | } else { |
126 | start_x = Convert.ToInt32(startLocationRequestParsed[1]); | 126 | start_x = Convert.ToInt32(startLocationRequestParsed[1]); |
@@ -135,10 +135,10 @@ namespace OpenSim.Grid.UserServer | |||
135 | //CFK: m_log.Info("[LOGIN]: Home Location"); | 135 | //CFK: m_log.Info("[LOGIN]: Home Location"); |
136 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + | 136 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + |
137 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + | 137 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + |
138 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 138 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
139 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 139 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
140 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + | 140 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
141 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 141 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
142 | 142 | ||
143 | // Destination | 143 | // Destination |
144 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 144 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
@@ -164,25 +164,25 @@ namespace OpenSim.Grid.UserServer | |||
164 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + | 164 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + |
165 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); | 165 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); |
166 | 166 | ||
167 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 167 | theUser.CurrentAgent.currentRegion = SimInfo.UUID; |
168 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 168 | theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; |
169 | if (start_x >= 0 && start_y >= 0 && start_z >= 0) { | 169 | if (start_x >= 0 && start_y >= 0 && start_z >= 0) { |
170 | theUser.currentAgent.currentPos.X = start_x; | 170 | theUser.CurrentAgent.currentPos.X = start_x; |
171 | theUser.currentAgent.currentPos.Y = start_y; | 171 | theUser.CurrentAgent.currentPos.Y = start_y; |
172 | theUser.currentAgent.currentPos.Z = start_z; | 172 | theUser.CurrentAgent.currentPos.Z = start_z; |
173 | } | 173 | } |
174 | // Prepare notification | 174 | // Prepare notification |
175 | Hashtable SimParams = new Hashtable(); | 175 | Hashtable SimParams = new Hashtable(); |
176 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | 176 | SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); |
177 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | 177 | SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); |
178 | SimParams["firstname"] = theUser.username; | 178 | SimParams["firstname"] = theUser.FirstName; |
179 | SimParams["lastname"] = theUser.surname; | 179 | SimParams["lastname"] = theUser.SurName; |
180 | SimParams["agent_id"] = theUser.UUID.ToString(); | 180 | SimParams["agent_id"] = theUser.Id.ToString(); |
181 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); | 181 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); |
182 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | 182 | SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); |
183 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | 183 | SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); |
184 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | 184 | SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); |
185 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | 185 | SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); |
186 | SimParams["caps_path"] = capsPath; | 186 | SimParams["caps_path"] = capsPath; |
187 | ArrayList SendParams = new ArrayList(); | 187 | ArrayList SendParams = new ArrayList(); |
188 | SendParams.Add(SimParams); | 188 | SendParams.Add(SimParams); |
@@ -206,9 +206,9 @@ namespace OpenSim.Grid.UserServer | |||
206 | if (handlerUserLoggedInAtLocation != null) | 206 | if (handlerUserLoggedInAtLocation != null) |
207 | { | 207 | { |
208 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 208 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
209 | handlerUserLoggedInAtLocation(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, | 209 | handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, |
210 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X,theUser.currentAgent.currentPos.Y,theUser.currentAgent.currentPos.Z, | 210 | theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X,theUser.CurrentAgent.currentPos.Y,theUser.CurrentAgent.currentPos.Z, |
211 | theUser.username,theUser.surname); | 211 | theUser.FirstName,theUser.SurName); |
212 | } | 212 | } |
213 | } | 213 | } |
214 | catch (Exception) | 214 | catch (Exception) |
@@ -237,10 +237,10 @@ namespace OpenSim.Grid.UserServer | |||
237 | m_log.Info("[LOGIN]: Home Location"); | 237 | m_log.Info("[LOGIN]: Home Location"); |
238 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + | 238 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + |
239 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + | 239 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + |
240 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 240 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
241 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 241 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
242 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + | 242 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
243 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 243 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
244 | 244 | ||
245 | // Destination | 245 | // Destination |
246 | m_log.Info("[LOGIN]: " + | 246 | m_log.Info("[LOGIN]: " + |
@@ -259,21 +259,21 @@ namespace OpenSim.Grid.UserServer | |||
259 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); | 259 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); |
260 | 260 | ||
261 | // Update agent with target sim | 261 | // Update agent with target sim |
262 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 262 | theUser.CurrentAgent.currentRegion = SimInfo.UUID; |
263 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 263 | theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; |
264 | 264 | ||
265 | // Prepare notification | 265 | // Prepare notification |
266 | Hashtable SimParams = new Hashtable(); | 266 | Hashtable SimParams = new Hashtable(); |
267 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | 267 | SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); |
268 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | 268 | SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); |
269 | SimParams["firstname"] = theUser.username; | 269 | SimParams["firstname"] = theUser.FirstName; |
270 | SimParams["lastname"] = theUser.surname; | 270 | SimParams["lastname"] = theUser.SurName; |
271 | SimParams["agent_id"] = theUser.UUID.ToString(); | 271 | SimParams["agent_id"] = theUser.Id.ToString(); |
272 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); | 272 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); |
273 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | 273 | SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); |
274 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | 274 | SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); |
275 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | 275 | SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); |
276 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | 276 | SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); |
277 | SimParams["caps_path"] = capsPath; | 277 | SimParams["caps_path"] = capsPath; |
278 | ArrayList SendParams = new ArrayList(); | 278 | ArrayList SendParams = new ArrayList(); |
279 | SendParams.Add(SimParams); | 279 | SendParams.Add(SimParams); |
@@ -286,9 +286,9 @@ namespace OpenSim.Grid.UserServer | |||
286 | if (handlerUserLoggedInAtLocation != null) | 286 | if (handlerUserLoggedInAtLocation != null) |
287 | { | 287 | { |
288 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 288 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
289 | handlerUserLoggedInAtLocation(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, | 289 | handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, |
290 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X, theUser.currentAgent.currentPos.Y, theUser.currentAgent.currentPos.Z, | 290 | theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X, theUser.CurrentAgent.currentPos.Y, theUser.CurrentAgent.currentPos.Z, |
291 | theUser.username, theUser.surname); | 291 | theUser.FirstName, theUser.SurName); |
292 | } | 292 | } |
293 | } | 293 | } |
294 | 294 | ||