aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-20 23:08:50 +0000
committerTeravus Ovares2008-01-20 23:08:50 +0000
commita3851b3812aae6221714b1e61656d0853fce7124 (patch)
tree8867b4d6c433b0230f276f88a95625695fb71390 /OpenSim/Grid
parentGraceful failure of teleport to unavailable regions might actually work now. (diff)
downloadopensim-SC-a3851b3812aae6221714b1e61656d0853fce7124.zip
opensim-SC-a3851b3812aae6221714b1e61656d0853fce7124.tar.gz
opensim-SC-a3851b3812aae6221714b1e61656d0853fce7124.tar.bz2
opensim-SC-a3851b3812aae6221714b1e61656d0853fce7124.tar.xz
* Added hooks for logout to all IUserService and all that implement it.
* Added a Logout message with a name on the console * Added a *fixme* message to figure out why the current agent session is null * After updating you may notice that there's a login <user> and also a logout<user>
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/MessagingServer/MessageService.cs2
-rw-r--r--OpenSim/Grid/UserServer/Main.cs1
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs37
3 files changed, 39 insertions, 1 deletions
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs
index 01bd9af..056bfcb 100644
--- a/OpenSim/Grid/MessagingServer/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer/MessageService.cs
@@ -388,7 +388,7 @@ namespace OpenSim.Grid.MessagingServer
388 LLUUID AgentID = new LLUUID((string)requestData["agent_id"]); 388 LLUUID AgentID = new LLUUID((string)requestData["agent_id"]);
389 389
390 390
391 ProcessLogOff(AgentID); 391 //ProcessLogOff(AgentID);
392 392
393 393
394 return new XmlRpcResponse(); 394 return new XmlRpcResponse();
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 00a1641..a2881e6 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -115,6 +115,7 @@ namespace OpenSim.Grid.UserServer
115 httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend); 115 httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend);
116 httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); 116 httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms);
117 httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); 117 httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList);
118 httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID);
118 119
119 // Message Server ---> User Server 120 // Message Server ---> User Server
120 httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer); 121 httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer);
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 03b1fbc..3f2aa5b 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -317,6 +317,43 @@ namespace OpenSim.Grid.UserServer
317 return ProfileToXmlRPCResponse(userProfile); 317 return ProfileToXmlRPCResponse(userProfile);
318 } 318 }
319 319
320 public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request)
321 {
322 XmlRpcResponse response = new XmlRpcResponse();
323 Hashtable requestData = (Hashtable)request.Params[0];
324
325
326 UserProfileData userProfile;
327
328 if (requestData.Contains("avatar_uuid"))
329 {
330 try
331 {
332 LLUUID userUUID = new LLUUID((string)requestData["avatar_uuid"]);
333 LLUUID RegionID = new LLUUID((string)requestData["region_uuid"]);
334 ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]);
335 float posx = (float)Convert.ToDecimal((string)requestData["region_pos_x"]);
336 float posy = (float)Convert.ToDecimal((string)requestData["region_pos_y"]);
337 float posz = (float)Convert.ToDecimal((string)requestData["region_pos_z"]);
338
339 LogOffUser(userUUID, RegionID, regionhandle, posx, posy, posz);
340 }
341 catch (FormatException)
342 {
343 OpenSim.Framework.Console.MainLog.Instance.Warn("LOGOUT", "Error in Logout XMLRPC Params");
344 return response;
345 }
346
347 }
348 else
349 {
350 return CreateUnknownUserErrorResponse();
351 }
352
353
354 return response;
355 }
356
320 #endregion 357 #endregion
321 358
322 public override UserProfileData SetupMasterUser(string firstName, string lastName) 359 public override UserProfileData SetupMasterUser(string firstName, string lastName)