aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs6
-rw-r--r--OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs21
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs27
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs57
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs81
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs4
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs55
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs33
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs1
-rw-r--r--OpenSim/Services/Interfaces/IUserAccountService.cs4
12 files changed, 235 insertions, 59 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index fdab254..d7b2ff8 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors
100 100
101 public AssetBase Get(string id) 101 public AssetBase Get(string id)
102 { 102 {
103// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Synchronous get request for {0}", id);
104
103 string uri = m_ServerURI + "/assets/" + id; 105 string uri = m_ServerURI + "/assets/" + id;
104 106
105 AssetBase asset = null; 107 AssetBase asset = null;
@@ -119,6 +121,8 @@ namespace OpenSim.Services.Connectors
119 121
120 public AssetBase GetCached(string id) 122 public AssetBase GetCached(string id)
121 { 123 {
124// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id);
125
122 if (m_Cache != null) 126 if (m_Cache != null)
123 return m_Cache.Get(id); 127 return m_Cache.Get(id);
124 128
@@ -177,6 +181,8 @@ namespace OpenSim.Services.Connectors
177 181
178 public bool Get(string id, Object sender, AssetRetrieved handler) 182 public bool Get(string id, Object sender, AssetRetrieved handler)
179 { 183 {
184// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Potentially asynchronous get request for {0}", id);
185
180 string uri = m_ServerURI + "/assets/" + id; 186 string uri = m_ServerURI + "/assets/" + id;
181 187
182 AssetBase asset = null; 188 AssetBase asset = null;
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
index 5c31639..bb5d51f 100644
--- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
@@ -29,7 +29,9 @@ using log4net;
29using Nini.Config; 29using Nini.Config;
30using System; 30using System;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections.Specialized;
32using System.Reflection; 33using System.Reflection;
34using System.Web;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Services.Interfaces; 36using OpenSim.Services.Interfaces;
35using OpenSim.Services.Connectors.Hypergrid; 37using OpenSim.Services.Connectors.Hypergrid;
@@ -73,11 +75,26 @@ namespace OpenSim.Services.Connectors
73 if (Uri.TryCreate(id, UriKind.Absolute, out assetUri) && 75 if (Uri.TryCreate(id, UriKind.Absolute, out assetUri) &&
74 assetUri.Scheme == Uri.UriSchemeHttp) 76 assetUri.Scheme == Uri.UriSchemeHttp)
75 { 77 {
76 url = "http://" + assetUri.Authority; 78 // Simian
77 assetID = assetUri.LocalPath.Trim(new char[] {'/'}); 79 if (assetUri.Query != string.Empty)
80 {
81 NameValueCollection qscoll = HttpUtility.ParseQueryString(assetUri.Query);
82 assetID = qscoll["id"];
83 if (assetID != null)
84 url = id.Replace(assetID, ""); // Malformed again, as simian expects
85 else
86 url = id; // !!! best effort
87 }
88 else // robust
89 {
90 url = "http://" + assetUri.Authority;
91 assetID = assetUri.LocalPath.Trim(new char[] { '/' });
92 }
93
78 return true; 94 return true;
79 } 95 }
80 96
97 m_log.DebugFormat("[HG ASSET SERVICE]: Malformed URL {0}", id);
81 return false; 98 return false;
82 } 99 }
83 100
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs
index 7cfd6e8..c030bca 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs
@@ -47,13 +47,36 @@ namespace OpenSim.Services.Connectors
47 47
48 public HeloServicesConnector(string serverURI) 48 public HeloServicesConnector(string serverURI)
49 { 49 {
50 m_ServerURI = serverURI.TrimEnd('/'); 50 if (!serverURI.EndsWith("="))
51 m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
52 else
53 {
54 // Simian sends malformed urls like this:
55 // http://valley.virtualportland.org/simtest/Grid/?id=
56 //
57 try
58 {
59 Uri uri = new Uri(serverURI + "xxx");
60 if (uri.Query == string.Empty)
61 m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
62 else
63 {
64 serverURI = serverURI + "xxx";
65 m_ServerURI = serverURI.Replace(uri.Query, "");
66 m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/";
67 }
68 }
69 catch (UriFormatException e)
70 {
71 m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI);
72 }
73 }
51 } 74 }
52 75
53 76
54 public virtual string Helo() 77 public virtual string Helo()
55 { 78 {
56 HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI + "/helo"); 79 HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
57 // Eventually we need to switch to HEAD 80 // Eventually we need to switch to HEAD
58 /* req.Method = "HEAD"; */ 81 /* req.Method = "HEAD"; */
59 82
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 0c55c2e..5b27cf6 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -334,6 +334,9 @@ namespace OpenSim.Services.Connectors.Hypergrid
334 UInt32.TryParse((string)hash["http_port"], out p); 334 UInt32.TryParse((string)hash["http_port"], out p);
335 region.HttpPort = p; 335 region.HttpPort = p;
336 } 336 }
337 if (hash.ContainsKey("server_uri") && hash["server_uri"] != null)
338 region.ServerURI = (string)hash["server_uri"];
339
337 if (hash["internal_port"] != null) 340 if (hash["internal_port"] != null)
338 { 341 {
339 int p = 0; 342 int p = 0;
@@ -558,6 +561,60 @@ namespace OpenSim.Services.Connectors.Hypergrid
558 return online; 561 return online;
559 } 562 }
560 563
564 public Dictionary<string,object> GetUserInfo (UUID userID)
565 {
566 Hashtable hash = new Hashtable();
567 hash["userID"] = userID.ToString();
568
569 IList paramList = new ArrayList();
570 paramList.Add(hash);
571
572 XmlRpcRequest request = new XmlRpcRequest("get_user_info", paramList);
573
574 Dictionary<string, object> info = new Dictionary<string, object>();
575 XmlRpcResponse response = null;
576 try
577 {
578 response = request.Send(m_ServerURL, 10000);
579 }
580 catch
581 {
582 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUserInfo", m_ServerURL);
583 return info;
584 }
585
586 if (response.IsFault)
587 {
588 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetServerURLs returned an error: {1}", m_ServerURL, response.FaultString);
589 return info;
590 }
591
592 hash = (Hashtable)response.Value;
593 try
594 {
595 if (hash == null)
596 {
597 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUserInfo Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
598 return info;
599 }
600
601 // Here is the actual response
602 foreach (object key in hash.Keys)
603 {
604 if (hash[key] != null)
605 {
606 info.Add(key.ToString(), hash[key]);
607 }
608 }
609 }
610 catch
611 {
612 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
613 }
614
615 return info;
616 }
617
561 public Dictionary<string, object> GetServerURLs(UUID userID) 618 public Dictionary<string, object> GetServerURLs(UUID userID)
562 { 619 {
563 Hashtable hash = new Hashtable(); 620 Hashtable hash = new Hashtable();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 9573e21..99523a1 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -86,6 +86,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
86 86
87 public SimianAssetServiceConnector(string url) 87 public SimianAssetServiceConnector(string url)
88 { 88 {
89 if (!url.EndsWith("/") && !url.EndsWith("="))
90 url = url + '/';
89 m_serverUrl = url; 91 m_serverUrl = url;
90 } 92 }
91 93
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 918544f..67a65ff 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -341,26 +341,54 @@ namespace OpenSim.Services.Connectors.SimianGrid
341 341
342 public List<GridRegion> GetHyperlinks(UUID scopeID) 342 public List<GridRegion> GetHyperlinks(UUID scopeID)
343 { 343 {
344 // Hypergrid/linked regions are not supported 344 List<GridRegion> foundRegions = new List<GridRegion>();
345 return new List<GridRegion>(); 345
346 NameValueCollection requestArgs = new NameValueCollection
347 {
348 { "RequestMethod", "GetScenes" },
349 { "HyperGrid", "true" },
350 { "Enabled", "1" }
351 };
352
353 OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
354 if (response["Success"].AsBoolean())
355 {
356 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name);
357
358 OSDArray array = response["Scenes"] as OSDArray;
359 if (array != null)
360 {
361 for (int i = 0; i < array.Count; i++)
362 {
363 GridRegion region = ResponseToGridRegion(array[i] as OSDMap);
364 if (region != null)
365 foundRegions.Add(region);
366 }
367 }
368 }
369
370 return foundRegions;
346 } 371 }
347 372
348 public int GetRegionFlags(UUID scopeID, UUID regionID) 373 public int GetRegionFlags(UUID scopeID, UUID regionID)
349 { 374 {
350 const int REGION_ONLINE = 4;
351
352 NameValueCollection requestArgs = new NameValueCollection 375 NameValueCollection requestArgs = new NameValueCollection
353 { 376 {
354 { "RequestMethod", "GetScene" }, 377 { "RequestMethod", "GetScene" },
355 { "SceneID", regionID.ToString() } 378 { "SceneID", regionID.ToString() }
356 }; 379 };
357 380
358 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString()); 381 m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString());
359 382
360 OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); 383 OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
361 if (response["Success"].AsBoolean()) 384 if (response["Success"].AsBoolean())
362 { 385 {
363 return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0; 386 OSDMap extraData = response["ExtraData"] as OSDMap;
387 int enabled = response["Enabled"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.RegionOnline : 0;
388 int hypergrid = extraData["HyperGrid"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.Hyperlink : 0;
389 int flags = enabled | hypergrid;
390 m_log.DebugFormat("[SGGC] enabled - {0} hg - {1} flags - {2}", enabled, hypergrid, flags);
391 return flags;
364 } 392 }
365 else 393 else
366 { 394 {
@@ -411,24 +439,27 @@ namespace OpenSim.Services.Connectors.SimianGrid
411 Vector3d minPosition = response["MinPosition"].AsVector3d(); 439 Vector3d minPosition = response["MinPosition"].AsVector3d();
412 region.RegionLocX = (int)minPosition.X; 440 region.RegionLocX = (int)minPosition.X;
413 region.RegionLocY = (int)minPosition.Y; 441 region.RegionLocY = (int)minPosition.Y;
414 442
415 Uri httpAddress = response["Address"].AsUri(); 443 if ( ! extraData["HyperGrid"] ) {
416 region.ExternalHostName = httpAddress.Host; 444 Uri httpAddress = response["Address"].AsUri();
417 region.HttpPort = (uint)httpAddress.Port; 445 region.ExternalHostName = httpAddress.Host;
418 446 region.HttpPort = (uint)httpAddress.Port;
419 region.ServerURI = extraData["ServerURI"].AsString(); 447
420 448 IPAddress internalAddress;
421 IPAddress internalAddress; 449 IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress);
422 IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress); 450 if (internalAddress == null)
423 if (internalAddress == null) 451 internalAddress = IPAddress.Any;
424 internalAddress = IPAddress.Any; 452
425 453 region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger());
426 region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger()); 454 region.TerrainImage = extraData["MapTexture"].AsUUID();
427 region.TerrainImage = extraData["MapTexture"].AsUUID(); 455 region.Access = (byte)extraData["Access"].AsInteger();
428 region.Access = (byte)extraData["Access"].AsInteger(); 456 region.RegionSecret = extraData["RegionSecret"].AsString();
429 region.RegionSecret = extraData["RegionSecret"].AsString(); 457 region.EstateOwner = extraData["EstateOwner"].AsUUID();
430 region.EstateOwner = extraData["EstateOwner"].AsUUID(); 458 region.Token = extraData["Token"].AsString();
431 region.Token = extraData["Token"].AsString(); 459 region.ServerURI = extraData["ServerURI"].AsString();
460 } else {
461 region.ServerURI = response["Address"];
462 }
432 463
433 return region; 464 return region;
434 } 465 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 39df1f5..f828abb 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -92,7 +92,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
92 92
93 public SimianInventoryServiceConnector(string url) 93 public SimianInventoryServiceConnector(string url)
94 { 94 {
95 if (!url.EndsWith("/") && !url.EndsWith("="))
96 url = url + '/';
95 m_serverUrl = url; 97 m_serverUrl = url;
98
96 } 99 }
97 100
98 public void Initialise(IConfigSource source) 101 public void Initialise(IConfigSource source)
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index 91e2976..4350749 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -287,6 +287,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
287 account.UserFlags = response["UserFlags"].AsInteger(); 287 account.UserFlags = response["UserFlags"].AsInteger();
288 account.UserLevel = response["AccessLevel"].AsInteger(); 288 account.UserLevel = response["AccessLevel"].AsInteger();
289 account.UserTitle = response["UserTitle"].AsString(); 289 account.UserTitle = response["UserTitle"].AsString();
290 account.LocalToGrid = true;
291 if (response.ContainsKey("LocalToGrid"))
292 account.LocalToGrid = (response["LocalToGrid"].AsString() == "true" ? true : false);
293
290 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); 294 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
291 295
292 // Cache the user account info 296 // Cache the user account info
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 90c022f..78eab3d 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -102,50 +102,45 @@ namespace OpenSim.Services.GridService
102 102
103 public HypergridLinker(IConfigSource config, GridService gridService, IRegionData db) 103 public HypergridLinker(IConfigSource config, GridService gridService, IRegionData db)
104 { 104 {
105 IConfig modulesConfig = config.Configs["Modules"]; 105 IConfig gridConfig = config.Configs["GridService"];
106 if (modulesConfig == null) 106 if (gridConfig == null)
107 return; 107 return;
108
109 if (modulesConfig.GetString("HypergridLinker", "") != "HypergridLinker")
110 return;
111 108
112 m_log.DebugFormat("[HYPERGRID LINKER]: Starting with db {0}", db.GetType()); 109 if (!gridConfig.GetBoolean("HypergridLinker", false))
110 return;
113 111
114 m_Database = db; 112 m_Database = db;
115 m_GridService = gridService; 113 m_GridService = gridService;
114 m_log.DebugFormat("[HYPERGRID LINKER]: Starting with db {0}", db.GetType());
116 115
117 IConfig gridConfig = config.Configs["GridService"]; 116 string assetService = gridConfig.GetString("AssetService", string.Empty);
118 if (gridConfig != null)
119 {
120 string assetService = gridConfig.GetString("AssetService", string.Empty);
121 117
122 Object[] args = new Object[] { config }; 118 Object[] args = new Object[] { config };
123 119
124 if (assetService != string.Empty) 120 if (assetService != string.Empty)
125 m_AssetService = ServerUtils.LoadPlugin<IAssetService>(assetService, args); 121 m_AssetService = ServerUtils.LoadPlugin<IAssetService>(assetService, args);
126 122
127 string scope = gridConfig.GetString("ScopeID", string.Empty); 123 string scope = gridConfig.GetString("ScopeID", string.Empty);
128 if (scope != string.Empty) 124 if (scope != string.Empty)
129 UUID.TryParse(scope, out m_ScopeID); 125 UUID.TryParse(scope, out m_ScopeID);
130 126
131// m_Check4096 = gridConfig.GetBoolean("Check4096", true); 127// m_Check4096 = gridConfig.GetBoolean("Check4096", true);
132 128
133 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); 129 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
134 130
135 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty); 131 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty);
136 try 132 try
137 { 133 {
138 m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper); 134 m_ThisGatekeeperURI = new Uri(m_ThisGatekeeper);
139 } 135 }
140 catch 136 catch
141 { 137 {
142 m_log.WarnFormat("[HYPERGRID LINKER]: Malformed URL in [GridService], variable Gatekeeper = {0}", m_ThisGatekeeper); 138 m_log.WarnFormat("[HYPERGRID LINKER]: Malformed URL in [GridService], variable Gatekeeper = {0}", m_ThisGatekeeper);
143 } 139 }
144 140
145 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); 141 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
146 142
147 m_log.Debug("[HYPERGRID LINKER]: Loaded all services..."); 143 m_log.Debug("[HYPERGRID LINKER]: Loaded all services...");
148 }
149 144
150 if (!string.IsNullOrEmpty(m_MapTileDirectory)) 145 if (!string.IsNullOrEmpty(m_MapTileDirectory))
151 { 146 {
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index cdc560c..f681df4 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -161,6 +161,14 @@ namespace OpenSim.Services.HypergridService
161 { 161 {
162 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", 162 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
163 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI); 163 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI);
164
165 if (m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID) == null)
166 {
167 m_log.WarnFormat("[USER AGENT SERVICE]: Someone attempted to lauch a foreign user from here {0} {1}", agentCircuit.firstname, agentCircuit.lastname);
168 reason = "Forbidden to launch your agents from here";
169 return false;
170 }
171
164 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination 172 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
165 GridRegion region = new GridRegion(gatekeeper); 173 GridRegion region = new GridRegion(gatekeeper);
166 region.ServerURI = gatekeeper.ServerURI; 174 region.ServerURI = gatekeeper.ServerURI;
@@ -480,6 +488,31 @@ namespace OpenSim.Services.HypergridService
480 return online; 488 return online;
481 } 489 }
482 490
491 public Dictionary<string, object> GetUserInfo(UUID userID)
492 {
493 Dictionary<string, object> info = new Dictionary<string, object>();
494
495 if (m_UserAccountService == null)
496 {
497 m_log.WarnFormat("[USER AGENT SERVICE]: Unable to get user flags because user account service is missing");
498 info["result"] = "fail";
499 info["message"] = "UserAccountService is missing!";
500 return info;
501 }
502
503 UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero /*!!!*/, userID);
504
505 if (account != null)
506 {
507 info.Add("user_flags", (object)account.UserFlags);
508 info.Add("user_created", (object)account.Created);
509 info.Add("user_title", (object)account.UserTitle);
510 info.Add("result", "success");
511 }
512
513 return info;
514 }
515
483 public Dictionary<string, object> GetServerURLs(UUID userID) 516 public Dictionary<string, object> GetServerURLs(UUID userID)
484 { 517 {
485 if (m_UserAccountService == null) 518 if (m_UserAccountService == null)
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index e86ec51..5b293ac 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -55,6 +55,7 @@ namespace OpenSim.Services.Interfaces
55 void LogoutAgent(UUID userID, UUID sessionID); 55 void LogoutAgent(UUID userID, UUID sessionID);
56 GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); 56 GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt);
57 Dictionary<string, object> GetServerURLs(UUID userID); 57 Dictionary<string, object> GetServerURLs(UUID userID);
58 Dictionary<string,object> GetUserInfo(UUID userID);
58 59
59 string LocateUser(UUID userID); 60 string LocateUser(UUID userID);
60 // Tries to get the universal user identifier for the targetUserId 61 // Tries to get the universal user identifier for the targetUserId
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs
index 6cc8eb8..1b85980 100644
--- a/OpenSim/Services/Interfaces/IUserAccountService.cs
+++ b/OpenSim/Services/Interfaces/IUserAccountService.cs
@@ -91,6 +91,7 @@ namespace OpenSim.Services.Interfaces
91 public int UserLevel; 91 public int UserLevel;
92 public int UserFlags; 92 public int UserFlags;
93 public string UserTitle; 93 public string UserTitle;
94 public Boolean LocalToGrid = true;
94 95
95 public Dictionary<string, object> ServiceURLs; 96 public Dictionary<string, object> ServiceURLs;
96 97
@@ -119,6 +120,8 @@ namespace OpenSim.Services.Interfaces
119 UserFlags = Convert.ToInt32(kvp["UserFlags"].ToString()); 120 UserFlags = Convert.ToInt32(kvp["UserFlags"].ToString());
120 if (kvp.ContainsKey("UserTitle")) 121 if (kvp.ContainsKey("UserTitle"))
121 UserTitle = kvp["UserTitle"].ToString(); 122 UserTitle = kvp["UserTitle"].ToString();
123 if (kvp.ContainsKey("LocalToGrid"))
124 Boolean.TryParse(kvp["LocalToGrid"].ToString(), out LocalToGrid);
122 125
123 if (kvp.ContainsKey("Created")) 126 if (kvp.ContainsKey("Created"))
124 Created = Convert.ToInt32(kvp["Created"].ToString()); 127 Created = Convert.ToInt32(kvp["Created"].ToString());
@@ -152,6 +155,7 @@ namespace OpenSim.Services.Interfaces
152 result["UserLevel"] = UserLevel.ToString(); 155 result["UserLevel"] = UserLevel.ToString();
153 result["UserFlags"] = UserFlags.ToString(); 156 result["UserFlags"] = UserFlags.ToString();
154 result["UserTitle"] = UserTitle; 157 result["UserTitle"] = UserTitle;
158 result["LocalToGrid"] = LocalToGrid.ToString();
155 159
156 string str = string.Empty; 160 string str = string.Empty;
157 foreach (KeyValuePair<string, object> kvp in ServiceURLs) 161 foreach (KeyValuePair<string, object> kvp in ServiceURLs)