diff options
author | Diva Canto | 2010-05-07 21:29:56 -0700 |
---|---|---|
committer | Diva Canto | 2010-05-07 21:29:56 -0700 |
commit | a58859a0d4206c194c9c56212218e2cafc2cc373 (patch) | |
tree | fed51a4e40c344b76f6b8b4d5c5b2ec0d2e142e4 /OpenSim/Server/Handlers | |
parent | improve handling of undersize sculpt textures (diff) | |
download | opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.zip opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.gz opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.bz2 opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.xz |
GridUserService in place. Replaces the contrived concept of storing user's home and position info in the presence service. WARNING: I violated a taboo by deleting 2 migration files and simplifying the original table creation for Presence. This should not cause any problems to anyone, though. Things will work with the new simplified table, as well as with the previous contrived one. If there are any problems, solving them is as easy as dropping the presence table and deleting its row in the migrations table. The presence info only exists during a user's session anyway.
BTW, the Meshing files want to be committed too -- EOFs.
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 4ebf933..3104917 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -90,8 +90,6 @@ namespace OpenSim.Server.Handlers.Presence | |||
90 | return GetAgent(request); | 90 | return GetAgent(request); |
91 | case "getagents": | 91 | case "getagents": |
92 | return GetAgents(request); | 92 | return GetAgents(request); |
93 | case "sethome": | ||
94 | return SetHome(request); | ||
95 | } | 93 | } |
96 | m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method); | 94 | m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method); |
97 | } | 95 | } |
@@ -140,12 +138,7 @@ namespace OpenSim.Server.Handlers.Presence | |||
140 | if (!UUID.TryParse(request["SessionID"].ToString(), out session)) | 138 | if (!UUID.TryParse(request["SessionID"].ToString(), out session)) |
141 | return FailureResult(); | 139 | return FailureResult(); |
142 | 140 | ||
143 | if (request.ContainsKey("Position") && request["Position"] != null) | 141 | if (m_PresenceService.LogoutAgent(session)) |
144 | Vector3.TryParse(request["Position"].ToString(), out position); | ||
145 | if (request.ContainsKey("LookAt") && request["Position"] != null) | ||
146 | Vector3.TryParse(request["LookAt"].ToString(), out lookat); | ||
147 | |||
148 | if (m_PresenceService.LogoutAgent(session, position, lookat)) | ||
149 | return SuccessResult(); | 142 | return SuccessResult(); |
150 | 143 | ||
151 | return FailureResult(); | 144 | return FailureResult(); |
@@ -171,8 +164,6 @@ namespace OpenSim.Server.Handlers.Presence | |||
171 | { | 164 | { |
172 | UUID session = UUID.Zero; | 165 | UUID session = UUID.Zero; |
173 | UUID region = UUID.Zero; | 166 | UUID region = UUID.Zero; |
174 | Vector3 position = new Vector3(128, 128, 70); | ||
175 | Vector3 look = Vector3.Zero; | ||
176 | 167 | ||
177 | if (!request.ContainsKey("SessionID") || !request.ContainsKey("RegionID")) | 168 | if (!request.ContainsKey("SessionID") || !request.ContainsKey("RegionID")) |
178 | return FailureResult(); | 169 | return FailureResult(); |
@@ -183,13 +174,7 @@ namespace OpenSim.Server.Handlers.Presence | |||
183 | if (!UUID.TryParse(request["RegionID"].ToString(), out region)) | 174 | if (!UUID.TryParse(request["RegionID"].ToString(), out region)) |
184 | return FailureResult(); | 175 | return FailureResult(); |
185 | 176 | ||
186 | if (request.ContainsKey("position")) | 177 | if (m_PresenceService.ReportAgent(session, region)) |
187 | Vector3.TryParse(request["position"].ToString(), out position); | ||
188 | |||
189 | if (request.ContainsKey("lookAt")) | ||
190 | Vector3.TryParse(request["lookAt"].ToString(), out look); | ||
191 | |||
192 | if (m_PresenceService.ReportAgent(session, region, position, look)) | ||
193 | { | 178 | { |
194 | return SuccessResult(); | 179 | return SuccessResult(); |
195 | } | 180 | } |
@@ -318,31 +303,5 @@ namespace OpenSim.Server.Handlers.Presence | |||
318 | return ms.ToArray(); | 303 | return ms.ToArray(); |
319 | } | 304 | } |
320 | 305 | ||
321 | byte[] SetHome(Dictionary<string, object> request) | ||
322 | { | ||
323 | UUID region = UUID.Zero; | ||
324 | Vector3 position = new Vector3(128, 128, 70); | ||
325 | Vector3 look = Vector3.Zero; | ||
326 | |||
327 | if (!request.ContainsKey("UserID") || !request.ContainsKey("RegionID")) | ||
328 | return FailureResult(); | ||
329 | |||
330 | string user = request["UserID"].ToString(); | ||
331 | |||
332 | if (!UUID.TryParse(request["RegionID"].ToString(), out region)) | ||
333 | return FailureResult(); | ||
334 | |||
335 | if (request.ContainsKey("position")) | ||
336 | Vector3.TryParse(request["position"].ToString(), out position); | ||
337 | |||
338 | if (request.ContainsKey("lookAt")) | ||
339 | Vector3.TryParse(request["lookAt"].ToString(), out look); | ||
340 | |||
341 | if (m_PresenceService.SetHomeLocation(user, region, position, look)) | ||
342 | return SuccessResult(); | ||
343 | |||
344 | return FailureResult(); | ||
345 | } | ||
346 | |||
347 | } | 306 | } |
348 | } | 307 | } |