aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/SimProfile.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Framework/SimProfile.cs35
1 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim.Framework/SimProfile.cs b/OpenSim.Framework/SimProfile.cs
index ac4cf9e..fd130f0 100644
--- a/OpenSim.Framework/SimProfile.cs
+++ b/OpenSim.Framework/SimProfile.cs
@@ -16,11 +16,43 @@ namespace OpenSim.Framework.Sims
16 { 16 {
17 Hashtable GridReqParams = new Hashtable(); 17 Hashtable GridReqParams = new Hashtable();
18 GridReqParams["region_handle"] = region_handle.ToString(); 18 GridReqParams["region_handle"] = region_handle.ToString();
19 GridReqParams["authkey"] = SendKey;
20 ArrayList SendParams = new ArrayList();
21 SendParams.Add(GridReqParams);
22 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
23
24 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
25
26 Hashtable RespData = (Hashtable)GridResp.Value;
27 this.UUID = new LLUUID((string)RespData["UUID"]);
28 this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]);
29 this.regionname = (string)RespData["regionname"];
30 this.sim_ip = (string)RespData["sim_ip"];
31 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
32 this.caps_url = (string)RespData["caps_url"];
33 this.RegionLocX = (uint)Convert.ToUInt32(RespData["RegionLocX"]);
34 this.RegionLocY = (uint)Convert.ToUInt32(RespData["RegionLocY"]);
35 this.sendkey = (string)RespData["sendkey"];
36 this.recvkey = (string)RespData["recvkey"];
37 }
38 catch (Exception e)
39 {
40 Console.WriteLine(e.ToString());
41 }
42 return this;
43 }
44
45 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
46 {
47 try
48 {
49 Hashtable GridReqParams = new Hashtable();
50 GridReqParams["UUID"] = UUID.ToString();
19 GridReqParams["caller"] = "userserver"; 51 GridReqParams["caller"] = "userserver";
20 GridReqParams["authkey"] = SendKey; 52 GridReqParams["authkey"] = SendKey;
21 ArrayList SendParams = new ArrayList(); 53 ArrayList SendParams = new ArrayList();
22 SendParams.Add(GridReqParams); 54 SendParams.Add(GridReqParams);
23 XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info", SendParams); 55 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
24 56
25 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000); 57 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
26 58
@@ -42,6 +74,7 @@ namespace OpenSim.Framework.Sims
42 } 74 }
43 return this; 75 return this;
44 } 76 }
77
45 78
46 public SimProfile() 79 public SimProfile()
47 { 80 {