* 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.
This commit is contained in:
Teravus Ovares
2008-05-31 12:18:29 +00:00
parent f2f183b307
commit febe78d062
21 changed files with 344 additions and 17 deletions

View File

@@ -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();