From febe78d06249cd4d36a86e97610dd45ab518a757 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 31 May 2008 12:18:29 +0000 Subject: * Implements UserServer logoff in a few situations * User tries to log-in but is already logged in. Userserver will send message to simulator user was in to log the user out there. * From the UserServer, admin types 'logoff-user firstname lastname message'. * Some regions may not get the message because they're not updated yet. --- OpenSim/Grid/UserServer/UserManager.cs | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'OpenSim/Grid/UserServer/UserManager.cs') diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index a82505d..1b47289 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -179,6 +179,54 @@ namespace OpenSim.Grid.UserServer return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar); } + public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request) + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable requestData = (Hashtable)request.Params[0]; + Hashtable responseData = new Hashtable(); + string returnstring = "FALSE"; + + if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && requestData.Contains("region_uuid")) + { + ulong cregionhandle = 0; + LLUUID regionUUID = LLUUID.Zero; + LLUUID AvatarID = LLUUID.Zero; + + Helpers.TryParse((string)requestData["avatar_id"], out AvatarID); + Helpers.TryParse((string)requestData["region_uuid"], out regionUUID); + try + { + cregionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); + } + catch (ArgumentException) + { + } + catch (OverflowException) + { + } + catch (FormatException) + { + } + + if (AvatarID != LLUUID.Zero) + { + UserProfileData userProfile = GetUserProfile(new LLUUID((string)requestData["avatar_id"])); + userProfile.CurrentAgent.Region = new LLUUID((string)requestData["region_uuid"]); + userProfile.CurrentAgent.Handle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); + //userProfile.CurrentAgent. + CommitAgent(ref userProfile); + //setUserProfile(userProfile); + + + returnstring = "TRUE"; + } + + } + responseData.Add("returnString", returnstring); + response.Value = responseData; + return response; + } + public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request) { XmlRpcResponse response = new XmlRpcResponse(); -- cgit v1.1