aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-31 12:18:29 +0000
committerTeravus Ovares2008-05-31 12:18:29 +0000
commitfebe78d06249cd4d36a86e97610dd45ab518a757 (patch)
tree7b9733fc14045f09e874440b923cfe443b781b6a /OpenSim/Grid/UserServer/UserManager.cs
parentMantis#1425. Thank you kindly, Melanie for a patch that: (diff)
downloadopensim-SC_OLD-febe78d06249cd4d36a86e97610dd45ab518a757.zip
opensim-SC_OLD-febe78d06249cd4d36a86e97610dd45ab518a757.tar.gz
opensim-SC_OLD-febe78d06249cd4d36a86e97610dd45ab518a757.tar.bz2
opensim-SC_OLD-febe78d06249cd4d36a86e97610dd45ab518a757.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Grid/UserServer/UserManager.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs48
1 files changed, 48 insertions, 0 deletions
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
179 return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar); 179 return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar);
180 } 180 }
181 181
182 public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request)
183 {
184 XmlRpcResponse response = new XmlRpcResponse();
185 Hashtable requestData = (Hashtable)request.Params[0];
186 Hashtable responseData = new Hashtable();
187 string returnstring = "FALSE";
188
189 if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && requestData.Contains("region_uuid"))
190 {
191 ulong cregionhandle = 0;
192 LLUUID regionUUID = LLUUID.Zero;
193 LLUUID AvatarID = LLUUID.Zero;
194
195 Helpers.TryParse((string)requestData["avatar_id"], out AvatarID);
196 Helpers.TryParse((string)requestData["region_uuid"], out regionUUID);
197 try
198 {
199 cregionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]);
200 }
201 catch (ArgumentException)
202 {
203 }
204 catch (OverflowException)
205 {
206 }
207 catch (FormatException)
208 {
209 }
210
211 if (AvatarID != LLUUID.Zero)
212 {
213 UserProfileData userProfile = GetUserProfile(new LLUUID((string)requestData["avatar_id"]));
214 userProfile.CurrentAgent.Region = new LLUUID((string)requestData["region_uuid"]);
215 userProfile.CurrentAgent.Handle = (ulong)Convert.ToInt64((string)requestData["region_handle"]);
216 //userProfile.CurrentAgent.
217 CommitAgent(ref userProfile);
218 //setUserProfile(userProfile);
219
220
221 returnstring = "TRUE";
222 }
223
224 }
225 responseData.Add("returnString", returnstring);
226 response.Value = responseData;
227 return response;
228 }
229
182 public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request) 230 public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request)
183 { 231 {
184 XmlRpcResponse response = new XmlRpcResponse(); 232 XmlRpcResponse response = new XmlRpcResponse();