aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 573e546..bfa454c 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -437,5 +437,48 @@ namespace OpenSim.Grid.UserServer
437 "A root inventory folder for user {0} could not be retrieved from the inventory service", 437 "A root inventory folder for user {0} could not be retrieved from the inventory service",
438 userID)); 438 userID));
439 } 439 }
440
441 public XmlRpcResponse XmlRPCSetLoginParams(XmlRpcRequest request)
442 {
443 XmlRpcResponse response = new XmlRpcResponse();
444 Hashtable requestData = (Hashtable) request.Params[0];
445 UserProfileData userProfile;
446 Hashtable responseData = new Hashtable();
447
448 UUID uid;
449 string pass = requestData["password"].ToString();
450
451 if(!UUID.TryParse((string) requestData["avatar_uuid"], out uid))
452 {
453 responseData["error"] = "No authorization";
454 response.Value = responseData;
455 return response;
456 }
457
458 userProfile = m_userManager.GetUserProfile(uid);
459
460 if (userProfile == null ||
461 (!AuthenticateUser(userProfile, pass)) ||
462 userProfile.GodLevel < 200)
463 {
464 responseData["error"] = "No authorization";
465 response.Value = responseData;
466 return response;
467 }
468
469 if (requestData.ContainsKey("login_level"))
470 {
471 m_minLoginLevel = Convert.ToInt32(requestData["login_level"]);
472 }
473
474 if (requestData.ContainsKey("login_motd"))
475 {
476 m_welcomeMessage = requestData["login_motd"].ToString();
477 }
478
479 response.Value = responseData;
480 return response;
481 }
482
440 } 483 }
441} 484}